Oracle¡¢SQL Server¡¢AccessÊý¾Ý¿â¸ßЧ¹û·ÖÒ³¼¼ÇÉ
ÔÚ³ÌÐòµÄ¿ª·¢¹ý³ÌÖУ¬´¦Àí·ÖÒ³ÊÇ´ó¼Ò½Ó´¥±È½ÏƵ·±µÄʼþ£¬ÒòΪÏÖÔÚÈí¼þ»ù±¾É϶¼ÊÇÓëÊý¾Ý¿â½øÐйҵöµÄ¡£µ«Ð§ÂÊÓÖÊÇÎÒÃÇËù×·ÇóµÄ£¬Èç¹ûÊÇÏñÔÀ´ÄÇÑù°ÑËùÓÐÂú×ãÌõ¼þµÄ¼Ç¼ȫ²¿¶¼Ñ¡Ôñ³öÀ´£¬ÔÙÈ¥½øÐзÖÒ³´¦Àí£¬ÄÇô¾Í»á¶à¶àµÄÀ˷ѵôÐí¶àµÄϵͳ´¦Àíʱ¼ä¡£ÎªÁËÄܹ»°ÑЧÂÊÌá¸ß£¬ËùÒÔÏÖÔÚÎÒÃǾÍֻѡÔñÎÒÃÇÐèÒªµÄÊý¾Ý£¬¼õÉÙÊý¾Ý¿âµÄ´¦Àíʱ¼ä£¬ÒÔϾÍÊdz£ÓÃSQL·ÖÒ³´¦Àí£º
¡¡¡¡1¡¢SQL Server¡¢AccessÊý¾Ý¿â
¡¡¡¡Õⶼ΢ÈíµÄÊý¾Ý¿â£¬¶¼ÊÇÒ»¼ÒÈË£¬»ù±¾µÄ²Ù×÷¶¼ÊDz¶à£¬³£²ÉÓÃÈçÏ·ÖÒ³Óï¾ä£º
¡¡¡¡PAGESIZE£ºÃ¿Ò³ÏÔʾµÄ¼Ç¼Êý
¡¡¡¡CURRENTPAGE£ºµ±Ç°Ò³ºÅ
¡¡¡¡Êý¾Ý±íµÄÃû×ÖÊÇ£ºcomponents
¡¡¡¡Ë÷ÒýÖ÷¼ü×ÖÊÇ£ºid
ÒÔÏÂÊÇÒýÓÃÆ¬¶Î£º
¡¡¡¡select top PAGESIZE * from components where id not in
¡¡¡¡(select top (PAGESIZE*(CURRENTPAGE-1))
¡¡¡¡id from components order by id)order by id
¡¡¡¡ÈçÏÂÁУº
ÒÔÏÂÊÇÒýÓÃÆ¬¶Î£º
¡¡¡¡select top 10 * from components where id not in
¡¡¡¡(select top 10*10 id from components order by id)
¡¡¡¡order by id
¡¡¡¡´Ó101Ìõ¼Ç¼¿ªÊ¼Ñ¡Ôñ£¬Ö»Ñ¡ÔñÇ°ÃæµÄ10Ìõ¼Ç¼
¡¡¡¡2¡¢OracleÊý¾Ý¿â
¡¡¡¡ÒòΪOracleÊý¾Ý¿âûÓÐTop¹Ø¼ü×Ö£¬ËùÒÔÕâÀï¾Í²»Äܹ»Ïñ΢ÈíµÄÊý¾Ý¾ÝÄÇÑù²Ù×÷£¬ÕâÀïÓÐÁ½ÖÖ·½·¨£º
¡¡¡¡(1)¡¢Ò»ÖÖÊÇÀûÓÃÏà·´µÄ¡£
¡¡¡¡PAGESIZE£ºÃ¿Ò³ÏÔʾµÄ¼Ç¼Êý
¡¡¡¡CURRENTPAGE£ºµ±Ç°Ò³ºÅ
¡¡¡¡Êý¾Ý±íµÄÃû×ÖÊÇ£ºcomponents
¡¡¡¡Ë÷ÒýÖ÷¼ü×ÖÊÇ£ºid
ÒÔÏÂÊÇÒýÓÃÆ¬¶Î£º
¡¡¡¡select * from components where id not
¡¡¡¡in(select id from components where
¡¡¡¡rownum<=(PAGESIZE*(CURRENTPAGE-1)))
¡¡¡¡and rownum<=PAGESIZE order by id;
¡¡¡¡ÈçÏÂÀý£º
ÒÔÏÂÊÇÒýÓÃÆ¬¶Î£º
¡¡¡¡select * from components where id not in
¡¡¡¡(select id from components where rownum<=100)
¡¡¡¡and rownum<=10 order by id;
¡¡¡¡´Ó101µ½¼Ç¼¿ªÊ¼Ñ¡Ôñ£¬Ñ¡ÔñÇ°Ãæ10Ìõ¡£
¡¡¡¡(2)¡¢Ê¹ÓÃminus£¬¼´ÖÐÎĵÄÒâ˼¾ÍÊǼõÈ¥¡£
ÒÔÏÂÊÇÒýÓÃÆ¬¶Î£º
¡¡¡¡
Ïà¹ØÎĵµ£º
ÎÄÕÂÌáµ½£¬ÓÃCache hit ratioµÄ·½·¨À´¼ì²éORACLEÐÔÄÜÎÊÌâ¹ýʱÁË£¬ÀïÃæÓоä·Ç³£ÐÎÏóµÄ»°£ºÕâÎÞÒìÓÚÒ»¸öÒ½ÉúÖ»ÖªµÀ¸ù¾ÝѪѹµÄÀ´ÖÎÁƲ¡ÈË£¬¶ø²¡ÈËÓÉÓÚÌÛÍ´£¬Éñ¾ÐË·Ü£¬ÑªÑ¹ÔÚÒ»¸öºÏÀíµÄ·¶Î§ÄÚ£¬Ò½ÉúÈ´¸æËß»¼Õߣ¬Äãû²¡£¬µÈÄãѪѹµÍµÄʱºòÔÙÀ´¡£Í¬ÑùµÄ£¬ÎÒÃDz»Äܽö½ö¸ù¾ÝCache hit ratioÀ´ÅжÏORACLEÊ ......
Oracle SQL(partI)
Data manipulation language(DML): select, insert, update, delete, merge.
Data definition language(DDL): create, alter, drop, rename, truncate, comment
Data control language(DCL): grant, revoke
Transaction control: commit, rollback, savepoint
Arithmetic Expressions:
+, -, *, / ......
Subquery: (single-row subqueries and multi-rows subqueries).
select select_list
from table
where expr operator (select select_list from table);
single-row subqueries operator: =, >, >=, <, <=, <>
e.g.:
1. select department_id, min(salary) from employees group by department_id ......
Confirming granted privileges
Data Dictionary View Description
ROLE_SYS_PRIVS System privileges granted to roles
ROLE_TAB_PRIVS & ......
PairWise subquery:
e.g.:
select * from wf_docsort where (ndocsortid,nmoduleinfoid) in (select ndocsortid, nmoduleinfoid from wf_docsort where instr(cname,'ÎÄ')>0)
the above sql is the same function as:
select * from wf_docsort where ndocsortid = (select ndocsortid from wf_docsort where ......