oracle»ù±¾²Ù×÷
describe TABLE_NAME; --ÃèÊö
----------------------------------------------------------------
create table as select XXXXXX
insert into TABLE_NAME (reac_1,reac_2.....) values(v1,v2)
insert into TABLE_NAME (select * from ..........)
update TABLE_NAME set reac_1=v1,................... where .....
delete from TABLE_NAME where ...................
----------------------------------------------------------------
select [all|distinct top n[percent]] with ties SELECT_LIST
[into[NEW_TABLE_NAME]]
[from {TABLE_NAME,....}][(OPTIMIZWE_HINTS)]
[where CLAUSE]
[group by CLAUSE]
[order by CLAUSE]
[compute CLAUSE]
[for browse]
--distinct ¼ìË÷ΨһµÄ±íÁÐÖµ
----------------------------------------------------------------
= != <> like and or between XXX and XXX in(XX,XX) union (ºÏ²¢²éѯ)
----------------------------------------------------------------
alter table TABLE_NAME add REAC_NAME REAC_TYPE --¸Ä±äÁÐ(Ìí¼ÓÁÐ)
EG: alter table scott.emp add name_my char(10) NULL;
alter table TABLE_NAME modify(name_my char(10)) --¸Ä±äÁ㤶È
alter table TABLE_NAME DROP COLUMN name_my --dropÁÐ
--------------------------
--º¯Êý-----------
---------------------------
asin() ·´ÕýÐþ acos()·´ÓàÐþ atan()·´ÕýÇÐ atb2(,)·´ÕýÇÐ
sin()ÕýÐþ cos()ÓàÐþ tan()ÕýÇÐ cot()ÓàÇÐ
exp()Ö¸Êý power(a,b)aµÄb´Î·½¸ù sort()ƽ·½¸ù square()ƽ·½
log()×ÔÈ»¶ÔÊý log10()¶ÔÊý abs()¾ø¶ÔÖµ
ceiling(a)´óÓÚaµÄ×îСÕûÊý floor(a)СÓÚaµÄ×î´óÕûÊý
rand()0-1µÄËæ»úÊý pi()3.14159 sign(a) a<0,=0,>0ʱ,·µ»Ø-1,0,1
count()ºÏ¼Æ sum()ÇóºÍ max() min()
----------------------------------------------------------------
ascii()ÇóascÖµ unicode()ÇóunicodeÖµ initcap()Ê××Öĸ±ä´óд
str(a,l,d)ת»¯Îª×Ö·û´®,aΪÊýÖµ,lΪ³¤,dΪ±£ÁôСÊýλÊý
len()Çó³¤ left(a,l) right(a,l)
Ïà¹ØÎĵµ£º
extent--×îС¿Õ¼ä·ÖÅ䵥λ --tablespace management
block --×îСi/oµ¥Î» --segment management
create tablespace james
datafile '/export/home/oracle/oradata/james.dbf'
size 100M ¡¡¡¡¡¡¡¡¡¡¡¡--³õʼµÄÎļþ´óС¡¡
autoextend On¡¡¡¡¡¡¡¡ --×Ô¶¯Ôö³¤
next 10M¡ ......
Ò»¡¢Oracle PackageµÄ×÷ÓÃ
1¡¢¶¨ÒåÓë˵Ã÷
a. Ïà¹Ø¶ÔÏó£¨×Ô¶¨ÒåÀàÐÍ¡¢º¯Êý¡¢´æ´¢¹ý³ÌµÈ£©µÄ·â×°
b. ³ÌÐò°üµÄ¸÷²¿·Ö
- ³ÌÐò°ü¹æ¸ñ˵Ã÷
ÉùÃ÷×Ó³ÌÐò
- ³ÌÐò°üÖ÷Ìå
&n ......
Òì»ú»Ö¸´¹ý³Ì£º
ÔÚrman>run
{
allocate channel ch00 type 'sbt_tape' parms="ENV=(NB_ORA_CLIENT=zjddms1)";
set newname for datafile 1 to '/oradata/zjdms/1.dbf';
......
set newname for datafile 23 to '/oradata/test/23.dbf';
set newname for datafile 24 to '/oradata/test/24.dbf';
restore databas ......
Just a few days ago a got to two Oracle DBAs discussing why the have so much “PX Deq Credit : send blkd” on a system. And if that is causing their performance problems.
The are some blog on the internet claiming it has to do with qc distribution and what ever.
But in many cases, especi ......
lengthb(string)¼ÆËãstringËùÕ¼µÄ×Ö½Ú³¤¶È :·µ»Ø×Ö·û´®µÄ³¤¶È£¬µ¥Î»ÊÇ×Ö½Ú
length(string)¼ÆËãstringËùÕ¼µÄ×Ö·û³¤¶È :·µ»Ø×Ö·û´®µÄ³¤¶È£¬µ¥Î»ÊÇ×Ö·û
¶ÔÓÚµ¥×Ö½Ú×Ö·û,LENGTHBºÍLENGTHÊÇÒ»ÑùµÄ.
Èç¿ÉÒÔÓÃlength(‘string’)=lengthb(‘string’)ÅжÏ×Ö·û´®ÊÇ·ñº¬ÓÐÖÐÎÄ¡£
select lengt ......