Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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)


Ïà¹ØÎĵµ£º

Oracle±í¿Õ¼ä¹ÜÀí

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±í¿Õ¼äѧϰ

Ò».±í¿Õ¼äѧϰ
¸öÈ˾õµÃ±í¿Õ¼äÏà¶ÔÓÚÊý¾Ý¿âÀ´ËµÊÇÖÁ¹ØÖØÒªµÄ£¬Ò»°ã·ÖΪpermanent(ÓÀ¾ÃÐÔ±í¿Õ¼ä),undo(undo±í¿Õ¼ä),temporary(ÁÙʱ±í¿Õ¼ä),Ò»°ãÎÒÃÇÊÇͨ¹ýÒÔÏÂsql½øÐв鿴±í¿Õ¼äµÄÀàÐ͵Ä.
select distinct t.contents from dba_tablespaces t;
²é¿´±í¿Õ¼äËù¶ÔÓ¦µÄÊý¾ÝÎļþ¡£
select t.name,t1.name
from v$tablespace ......

oracle µÝ¹é²éѯ


Start with...Connect By×Ó¾äµÝ¹é²éѯһ°ãÓÃÓÚÒ»¸ö±íά»¤Ê÷ÐνṹµÄÓ¦Óá£
´´½¨Ê¾Àý±í£º
CREATE TABLE TBL_TEST
(
  ID    NUMBER,
  NAME  VARCHAR2(100 BYTE),
  PID   NUMBER             &nbs ......

oracle wait event:PX Deq Credit: send blkd

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 ......

oracle½ØÈ¡×Ö·û´®µÄº¯Êýsubstr

Óï·¨:
substr( string, start_position, [ length ] )
È¡×Ó×Ö·û´®,´Óstart_position¿ªÊ¼,È¡length¸ö,lengthΪ¿ÉÑ¡£¬Èç¹ûlengthΪ¿ÕÔò·µ»Østart_positionºóµÄËùÓÐ×Ö·û¡£
ʵÀý:
    substr('This is a test', 6, 2)          would return 'is'
 &nbs ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ