OracleµÄ·ÖÒ³ÏÔʾ
Õâ¸öOracleµÄ·ÖÒ³ÏÔʾ¾Ý˵ÊÇ×îÂé·³µÄ£¨MySQL×î¼òµ¥£©£¬µ«ÊÇÕâ¸ö·ÖÒ³ÏÔʾºÜÓÐÓá£ÏÖÔںܶàÍøÕ¾ÉϵÄÌõÄ¿¶¼·Ç³£¶à£¬ÀýÈçÐÂÎÅ£¬¿ÉÄܾ͸ոüеľÍÓÐÉÏ°ÙÌõ£¬ÔÙ¼ÓÉÏÒÔÇ°µÄ£¬Ò»ÕÅÒ³Ãæ¿Ï¶¨¾ÍÊǷŲ»ÏÂÁË£¬ËùÒÔ·ÖÒ³µÄºÃ´¦¾ÍÊÇ¿ÉÒÔ½â¾öÕâ¸öÎÊÌâ¡£
ÏÂÃæÒ»ÅÅÅŵĽÐÄãÑ¡ÔñµÚ¼¸Ò³£¬Ò»Ñ¡Ôñ£¬Ö±½Ó¾ÍÌøµ½ºóÃæµÄ¼¸Ò³È¥ÁË£¬²»ÓÃÕâÑù´ÓÉÏÒ»Ö±¹ö¶¯Ìõµ½ÏÂÃæ¡£
àÅ£¬ÏÂÃæ¾Í¿ªÊ¼¸´Ï°ÏÂÕâ¸ö·ÖÒ³ÏÔʾ¡£
±¾À´ËµÕâ¸ö·ÖÒ³ÏÔʾÓÐ3ÖÖ·½Ê½£¬Ò»¸ö·½Ê½¼òµ¥Ð©£¬µ«ÊÇЧÂÊÌ«µÍÁË£¬Ò»¸öЧÂʺ㬵«ÊÇÌ«¸´ÔÓÁË¡£ËùÒÔ¾ÍÖÐӹһϣ¬Ñ¡Á˸öЧÂÊÒ»°ã£¬¸´ÔÓ¶ÈÒ»°ãµÄ·½·¨¡£
¼ÙÉèÎÒÃÇÓÐÒ»¸ö±í EMP
ID NAME TELEPHONE
1 MAC 111111111
2 Window 222222222
3 switch 333333333
4 case 444444444
5 Linux 555555555
¼ÙÉèÎÒÃÇÈ¡Ç°Ãæ3¸ö£¬ÎÒÃÇ¿ÉÒÔÓÃrownumÕâ¸ö·ûºÅ
select * from EMP where rownum <= 3;
ID NAME TELEPHONE
--- ----------------- ---------------
1 MAC 111111111
2 Window 222222222
3 switch 333333333
²»¹ýÒªÊÇÎÒÃÇÏëÏÔʾÏÂËûµÄÐкŵĻ°£¬²ÉÓÃÕâÖÖ·½·¨£º
select *, rownum from EMP where rownum <= 3;
»á³öÏÖ´íÎó£º
ORA-00923£ºÎ´ÕÒµ½ÒªÇóµÄfrom¹Ø¼ü×Ö
ËùÒÔÒª²ÉÓÃÓØ»ØÕþ²ß£¬Ê¹ÓÃ×Ó²éѯÓï¾ä
select a.*, rownum from (select * from EMP) a where rownum <= 3;
ÄÇôÔÚºóÃæ¾Í»áÏÔʾËûµÄÐкÅ
ID NAME TELEPHONE ROWNUM
--- ----------------- --------------- ---------
1 MAC &
Ïà¹ØÎĵµ£º
ÎÊÌâÃèÊö
=======
ÔÚÊÔͼÆô¶¯Êý¾Ý¿âµÄʱºò,Oracle±¨¸æÏÂÁдíÎó£º
ERROR:
ORA-27101 Shared memory realm does not exist
ORA-01034 ORACLE not available
»ù±¾½âÊÍ
=======
Error: ORA-27101
Text: shared memory realm does not exist
-------------------------------------------
Ca ......
1 ¾Û¼¯(cluster)
1.1 ¸ÅÄ
ÓÃÓÚ½«²»Í¬±íÖеÄÊý¾Ý´æ´¢µ½ÏàͬµÄÎïÀíÊý¾Ý¿éÖУ¬ÓÃÓÚ¶à±íÊý¾ÝÐèҪƵ·±½øÐÐÁªºÏ²éѯµÄÇé¿öÏ¡£¶à±íÊý¾Ý´æ´¢ÔÚÏàͬÊý¾Ý¿éºó£¬ÔÚ¶Ô¶Ô±í½øÐÐÁªºÏ²éѯʱ£¬ËùÐè¶ÁÈ¡µÄÎïÀí¿éÊý¼õÉÙ£¬´Ó¶øÌá¸ß²éѯÐÔÄÜ¡£
ÐèҪעÒâµÄÊǶԾۼ¯Öе¥±íµÄ²éѯºÍ¶Ô¾Û¼¯ÖбíÊý¾Ý½øÐÐÐ޸Ļò²åÈëµÈÊÂÎñ²Ù×÷ʱ£¬ÐÔÄܽ«Ê ......
Óï·¨£º
select *
from ±íÃû
where Ìõ¼þ1
start with Ìõ¼þ2
connect by prior µ±Ç°±í×Ö¶Î=¼¶Áª±í×Ö¶Î
start withÓëconnect by priorÓï¾äÍê³ÉµÝ¹é¼Ç¼£¬ÐγÉÒ»¿ÃÊ÷Ðνṹ£¬Í¨³£¿ÉÒÔÔÚ¾ßÓвã´Î½á¹¹µÄ±íÖÐʹÓá£
start with±íʾ¿ªÊ¼µÄ¼Ç¼
connect by prior Ö¸¶¨Ó뵱ǰ¼Ç¼¹ØÁªÊ±µÄ×ֶιØϵ
´úÂ룺
--´´½¨²¿Ãű ......
½ñÌìÔÚ¶Ô±í´´½¨ÊÓͼµÄʱºò£¬Óû§Ìáʾ ORA-01031Óû§È¨ÏÞ²»×ã
ʹÓÃsystemÓû§¶ÔÆä·ÖÅädbaµÈȨÏÞ£¬ÒÀÈ»ÎÞ·¨´´½¨ÊÓͼ¡£
¼ÌÐø¸³ÓèȨÏÞ
grant select any table to AAA;
ÊÚÓèÓû§Ñ¯ËùÓбíµÄȨÏÞ
grant select any dictionary to AAA;
ÔÙ´ÎÊÚÈ¡Óû§selectÈκÎ×ÖµäµÄȨÏÞ
......
alter system set nls_length_semantics='BYTE' scope=both
sql>show parameter length
NAME TYPE
------------------------------------ --------------------- ......