ORACLEÈÕÆÚʱ¼äº¯Êý´óÈ«
TO_DATE¸ñʽ(ÒÔʱ¼ä:2007-11-02 13:45:25ΪÀý)
Year:
yy two digits Á½Î»Äê ÏÔʾֵ:07
yyy three digits ÈýλÄê ÏÔʾֵ:007
yyyy four digits ËÄλÄê ÏÔʾֵ:2007
Month:
mm number Á½Î»Ô ÏÔʾֵ:11
mon abbreviated ×Ö·û¼¯±íʾ ÏÔʾֵ:11ÔÂ,ÈôÊÇÓ¢Îİæ,ÏÔʾnov
month spelled out ×Ö·û¼¯±íʾ ÏÔʾֵ:11ÔÂ,ÈôÊÇÓ¢Îİæ,ÏÔʾnovember
Day:
dd number µ±Ôµڼ¸Ìì ÏÔʾֵ:02
ddd number µ±ÄêµÚ¼¸Ìì ÏÔʾֵ:02
dy abbreviated µ±Öܵڼ¸Ìì¼òд ÏÔʾֵ:ÐÇÆÚÎå,ÈôÊÇÓ¢Îİæ,
Ïà¹ØÎĵµ£º
ÎÒÁгöÎÒÈ«²¿µÄ×ö·¨£º
table a ÓÐid1, str1, str2, str3
¿ªÊ¼µÄpkÊÇid1, str1, str2
Ï£Íû¸Ä³Éid1, str1, str3
--ÎÊÌâ
СµÜÏÈÓÐÈçÏÂÎÊÌ⣺
Ò»¸ö±íÔÀ´µÄPKÊÇ id1+str1+str2 ÁÐ
ÏÈÐ޸ijÉid1+str1+str3ÁÐ
¶øÕâÈýÁÐÏÖÔÚµ±Ç°Êý¾Ý¿âµÄÊý¾ÝÓÐÖØ¸´µÄÇé¿ö£¬ СµÜÏÖÔÚÓÃsql:
ALTER table a a ......
select p.spid,
a.serial#,
c.object_name,
b.session_id,
b.oracle_username,
b.os_user_name
from v$proces ......
Á·Ï°ÁËORACLEÀàËÆµÄ·ÖÒ³,Ä¿µÄ:ORACLEµÄLIMITʹÓÃ
declare
type name_arrary_type is varray(20) of varchar2(10);
name_arrary name_arrary_type;
rowss int:=&ÊäÈëÒ³¼Ç¼Êý;
dpno int:=&ÊäÈ벿ÃźÅ;
v_count int:=0;
cursor emp_cursor(dpno int) is select ename from emp where deptno=dpno; ......
ÈÕ³£¿ª·¢»î¶¯ÖУ¬ÓÐʱºòÐèÒª¶ÔoracleÖ´Ðмƻ®½øÐÐ¼à¿Ø£¬ÒÔ´ËÀ´µ÷ÓųÌÐòºÍÊý¾Ý¿â·½ÃæµÄÐÔÄÜ¡£
³£Ó÷½·¨ÓÐÒÔϼ¸ÖÖ£º
Ò»¡¢Í¨¹ýPL/SQL Dev¹¤¾ß
1¡¢Ö±½ÓFile->New->Explain Plan Window£¬ÔÚ´°¿ÚÖÐÖ´ÐÐsql¿ÉÒԲ鿴¼Æ»®½á¹û¡£ÆäÖУ¬Cost±íʾcpuµÄÏûºÄ£¬µ¥Î»Îªn%£¬Cardinality±íʾִÐеÄÐÐÊý£¬µÈ¼ÛRow ......
±í¡¡¡¡¡¡¡¡tree
¡¡¡¡×ֶΡ¡¡¡¡¡master
¡¡¡¡¡¡¡¡¡¡¡¡¡¡sub
¡¡¡¡¡¡¡¡¡¡¡¡¡¡sales
¡¡¡¡insert into tree values
¡¡¡¡('Ö÷1',¡¡¡¡ 'Ö÷2',¡¡ 15);¡¡
¡¡¡¡insert into tree values¡¡¡¡¡¡
¡¡¡¡('Ö÷1',¡¡¡¡ 'Ö÷3',¡¡ 20);¡¡¡¡¡¡¡¡¡¡
¡¡¡¡insert into tree values
¡¡¡¡('Ö÷2',¡¡¡¡ 'Ö÷4',¡¡¡¡5);¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡
¡ ......