Oracle·ÖÒ³²éѯÓï¾ä
·ÖÒ³²éѯ¸ñʽ£º
SELECT * from
(
SELECT A.*, ROWNUM RN
from (SELECT * from TABLE_NAME) A
WHERE ROWNUM <= 40
)
WHERE RN >= 21
ÆäÖÐ×îÄÚ²ãµÄ²éѯSELECT * from TABLE_NAME±íʾ²»½øÐзҳµÄÔʼ²éѯÓï¾ä¡£ROWNUM <= 40ºÍRN >= 21¿ØÖÆ·ÖÒ³²éѯµÄÿҳµÄ·¶Î§¡£
ÉÏÃæ¸ø³öµÄÕâ¸ö·ÖÒ³²éѯÓï¾ä£¬ÔÚ´ó¶àÊýÇé¿öÓµÓнϸߵÄЧÂÊ¡£·ÖÒ³µÄÄ¿µÄ¾ÍÊÇ¿ØÖÆÊä³ö½á¹û¼¯´óС£¬½«½á¹û¾¡¿ìµÄ·µ»Ø¡£ÔÚÉÏÃæµÄ·ÖÒ³²éѯÓï¾äÖУ¬ÕâÖÖ¿¼ÂÇÖ÷ÒªÌåÏÖÔÚWHERE ROWNUM <= 40Õâ¾äÉÏ¡£
Ñ¡ÔñµÚ21µ½40Ìõ¼Ç¼´æÔÚÁ½ÖÖ·½·¨£¬Ò»ÖÖÊÇÉÏÃæÀý×ÓÖÐչʾµÄÔÚ²éѯµÄµÚ¶þ²ãͨ¹ýROWNUM <= 40À´¿ØÖÆ×î´óÖµ£¬ÔÚ²éѯµÄ×îÍâ²ã¿ØÖÆ×îСֵ¡£¶øÁíÒ»ÖÖ·½Ê½ÊÇÈ¥µô²éѯµÚ¶þ²ãµÄWHERE ROWNUM <= 40Óï¾ä£¬ÔÚ²éѯµÄ×îÍâ²ã¿ØÖÆ·ÖÒ³µÄ×îСֵºÍ×î´óÖµ¡£ÕâÊÇ£¬²éѯÓï¾äÈçÏ£º
SELECT * from
(
SELECT A.*, ROWNUM RN
from (SELECT * from TABLE_NAME) A
)
WHERE RN BETWEEN 21 AND 40
¶Ô±ÈÕâÁ½ÖÖд·¨£¬¾ø´ó¶àÊýµÄÇé¿öÏ£¬µÚÒ»¸ö²éѯµÄЧÂʱȵڶþ¸ö¸ßµÃ¶à¡£
ÕâÊÇÓÉÓÚCBOÓÅ»¯Ä£Ê½Ï£¬Oracle¿ÉÒÔ½«Íâ²ãµÄ²éѯÌõ¼þÍƵ½ÄÚ²ã²éѯÖУ¬ÒÔÌá¸ßÄÚ²ã²éѯµÄÖ´ÐÐЧÂÊ¡£¶ÔÓÚµÚÒ»¸ö²éѯÓï¾ä£¬µÚ¶þ²ãµÄ²éѯÌõ¼þWHERE ROWNUM <= 40¾Í¿ÉÒÔ±»OracleÍÆÈëµ½ÄÚ²ã²éѯÖУ¬ÕâÑùOracle²éѯµÄ½á¹ûÒ»µ©³¬¹ýÁËROWNUMÏÞÖÆÌõ¼þ£¬¾ÍÖÕÖ¹²éѯ½«½á¹û·µ»ØÁË¡£
¶øµÚ¶þ¸ö²éѯÓï¾ä£¬ÓÉÓÚ²éѯÌõ¼þBETWEEN 21 AND 40ÊÇ´æÔÚÓÚ²éѯµÄµÚÈý²ã£¬¶øOracleÎÞ·¨½«µÚÈý²ãµÄ²éѯÌõ¼þÍƵ½×îÄڲ㣨¼´Ê¹ÍƵ½×îÄÚ²ãҲûÓÐÒâÒ壬ÒòΪ×îÄÚ²ã²éѯ²»ÖªµÀRN´ú±íʲô£©¡£Òò´Ë£¬¶ÔÓÚµÚ¶þ¸ö²éѯÓï¾ä£¬Oracle×îÄڲ㷵»Ø¸øÖмä²ãµÄÊÇËùÓÐÂú×ãÌõ¼þµÄÊý¾Ý£¬¶øÖмä²ã·µ»Ø¸ø×îÍâ²ãµÄÒ²ÊÇËùÓÐÊý¾Ý¡£Êý¾ÝµÄ¹ýÂËÔÚ×îÍâ²ãÍê³É£¬ÏÔÈ»Õâ¸öЧÂÊÒª±ÈµÚÒ»¸ö²éѯµÍµÃ¶à¡£
ÉÏÃæ·ÖÎöµÄ²éѯ²»½ö½öÊÇÕë¶Ôµ¥±íµÄ¼òµ¥²éѯ£¬¶ÔÓÚ×îÄÚ²ã²éѯÊǸ´ÔӵĶà±íÁªºÏ²éѯ»ò×îÄÚ²ã²éѯ°üº¬ÅÅÐòµÄÇé¿öÒ»ÑùÓÐЧ¡£
ÕâÀï¾Í²»¶Ô°üº¬ÅÅÐòµÄ²éѯ½øÐÐ˵Ã÷ÁË£¬ÏÂһƪÎÄÕ»áͨ¹ýÀý×ÓÀ´Ïêϸ˵Ã÷¡£ÏÂÃæ¼òµ¥ÌÖÂÛһ϶à±íÁªºÏµÄÇé¿ö¡£¶ÔÓÚ×î³£¼ûµÄµÈÖµ±íÁ¬½Ó²éѯ£¬CBOÒ»°ã¿ÉÄÜ»á²ÉÓÃÁ½ÖÖÁ¬½Ó·½Ê½NESTED LOOPºÍHASH JOIN£¨MERGE JOINЧÂʱÈHASH JOINЧÂʵͣ¬Ò»°ãCBO²»»á¿¼ÂÇ£©¡£ÔÚÕâÀÓÉÓÚʹÓÃÁË·ÖÒ³£¬Òò´ËÖ¸¶¨ÁËÒ»¸ö·µ»ØµÄ×î´ó¼Ç¼Êý£¬NESTED LOOPÔÚ·µ»Ø¼Ç¼Êý³¬¹ý×î´óֵʱ¿ÉÒÔÂíÉÏÍ£Ö¹²¢½«½á¹û·µ»Ø¸øÖмä²ã£¬¶øHASH JOIN±ØÐë´¦ÀíÍêËùÓнá¹û¼¯£¨MERGE JOINÒ²ÊÇ£©¡£ÄÇôÔڴ󲿷ֵ
Ïà¹ØÎĵµ£º
oracle±í¿Õ¼ä²Ù×÷Ïê½â
1
2
3×÷Õߣº À´Ô´£º ¸üÐÂÈÕÆÚ£º2006-01-04
5
6
7½¨Á¢±í¿Õ¼ä
8
9CREATE TABLESPACE data01
10DATAFILE '/ora ......
µ¼³ö EXP USER/PASSWORD@ODBC FILE=C£º\***.DMP ROWS=N //²»±£´æÊý¾Ý£»
µ¼³ö EXP USER/PASSWORD@ODBC FILE=C£º\***.DMP //±£´æÊý¾Ý£»
µ¼³ö EXP USER/PASSWORD@ODBC FILE=C£º\***.DMP full=y //È«²¿µ¼³ö£»
µ¼Èë imp user/password@odbc file=c:\***.dmp full=y ignore=y;
OracleÊý¾Ýµ¼Èëµ¼³öimp/exp¾ÍÏà ......
linuxÏÂoracle°²×°£º
Oracle¹«Ë¾Ðû³ÆÔÚLinuxÏ°²×°Oracle9iÊý¾Ý¿âÖÁÉÙÒªÓÐ512MBµÄÄÚ´æºÍÖÁÉÙ1GB»òÕßÁ½±¶
ÄÚ´æ´óСµÄ½»»»¿Õ¼ä£¬¶ÔÓÚϵͳÄÚ´æ´óÓÚ2GBµÄ·þÎñÆ÷£¬½»»»¿Õ¼ä¿ÉÒÔ½éÓÚ2GB—4GBÖ®¼ä¡£
Èç¹ûÊÇΪÁËÔÚһ̨½öÓÐ256MÄÚ´æµÄÆÕͨPC»úÉÏÊÔÓÃOracle9 ......
ת×Ô£ºhttp://www.cnblogs.com/houxm/archive/2009/08/26/1554481.html
Ïê½â£ºhttp://sunwayle.blog.51cto.com/114995/102516
Oracle »ØÊÕÕ¾¹¦ÄÜ,³¹µ×ɾ³ý±í
Oracle 10g
ÖгöÏÖ±íÃû£ºBIN$2cMp4FjwQ2Cw3Lj+BxLYTw==$0
×î½ü·¢ÏÖOracleÖгöÏÖÁËÕâЩÆæ¹ÖµÄ±íÃû£¬ÉÏÍø²éÕÒºó·¢ÏÖÊÇoracle10gµÄ»ØÊÕÕ¾¹¦ÄÜ£¬²¢Ã»Óг¹µ×µÄɾ³ ......
·½°¸Ò»£º
ÐÂ×°ÁËϵͳºó£¬·¢ÏÖÔÚµ÷ÊÔ³ÌÐòʱTOMCATÌáʾ8080¶Ë¿ÚÒѱ»Õ¼Óã¬ÓÚÊÇÔËÐÐNETSTAT -ANO²é¿´¶Ë¿ÚʹÓÃÇé¿ö£¬·¢ÏÖ8080¶Ë¿Ú±»ORACLEµÄ¼àÌýÆ÷¸øÕ¼ÓÃÁË£¬ÓÚÊǽáºÏÉÏÍø²éµ½·½·¨£¬½«ORACLE XDBµÄHTTP·þÎñ¶Ë¿Ú¸Ä³É8081£¬ÎÊÌâ½â¾ö¡£
×ܽáһϿɽâ¾öµÄ·½ ......