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

oracle¸ù¾ÝÍâ¼üÃû²é¹ØÁªµÄ±í

1¡¢²éÕÒ±íµÄËùÓÐË÷Òý£¨°üÀ¨Ë÷ÒýÃû£¬ÀàÐÍ£¬¹¹³ÉÁУ©£º
select t.*,i.index_type from user_ind_columns t,user_indexes i where t.index_name = i.index_name and t.table_name = i.table_name and t.table_name = Òª²éѯµÄ±í
2¡¢²éÕÒ±íµÄÖ÷¼ü£¨°üÀ¨Ãû³Æ£¬¹¹³ÉÁУ©£º
select cu.* from user_cons_columns cu, user_constraints au where cu.constraint_name = au.constraint_name and au.constraint_type = 'P' and au.table_name = Òª²éѯµÄ±í
3¡¢²éÕÒ±íµÄΨһÐÔÔ¼Êø£¨°üÀ¨Ãû³Æ£¬¹¹³ÉÁУ©£º
select column_name from user_cons_columns cu, user_constraints au where cu.constraint_name = au.constraint_name and au.constraint_type = 'U' and au.table_name = Òª²éѯµÄ±í
4¡¢²éÕÒ±íµÄÍâ¼ü£¨°üÀ¨Ãû³Æ£¬ÒýÓñíµÄ±íÃûºÍ¶ÔÓ¦µÄ¼üÃû£¬ÏÂÃæÊǷֳɶಽ²éѯ£©£º
select * from user_constraints c where c.constraint_type = 'R' and c.table_name = Òª²éѯµÄ±í
²éѯÍâ¼üÔ¼ÊøµÄÁÐÃû£º
select * from user_cons_columns cl where cl.constraint_name = Íâ¼üÃû³Æ
²éѯÒýÓñíµÄ¼üµÄÁÐÃû£º
select * from user_cons_columns cl where cl.constraint_name = Íâ¼üÒýÓñíµÄ¼üÃû
5¡¢²éѯ±íµÄËùÓÐÁм°ÆäÊôÐÔ
select t.*,c.COMMENTS from user_tab_columns t,user_col_comments c where t.table_name = c.table_name and t.column_name = c.column_name and t.table_name = Òª²éѯµÄ±í


Ïà¹ØÎĵµ£º

oracleÌøÔ¾Ë÷ÒýµÄÓ¦Óó¡ºÏ

     Ë÷ÒýÌøԾʽɨÃè(index skip scan)ÊÇOracle9iµÄÒ»¸öеÄÖ´ÐÐÌØÐÔ£¬ÓÈÆäÊÊÓÃÓÚʹÓÃÁ¬½ÓË÷ÒýºÍ·ÃÎʶàÖµË÷ÒýµÄOracle²éѯ¡£
     Ë÷ÒýÌøԾʽɨÃè(index skip scan)ÊÇOracle9iµÄÒ»¸öеÄÖ´ÐÐÌØÐÔ£¬ÓÈÆäÊÊÓÃÓÚʹÓÃÁ¬½ÓË÷ÒýºÍ·ÃÎʶàÖµË÷ÒýµÄOracle²éѯ¡£ÈÃÎÒÃÇ¿´ÒÔϵķ¶Àý¡£Çë×¢Òâ ......

Oracle SQLÓëANSI SQLÇø±ð


Oracle SQLÓëANSI SQLÇø±ð
ÏàÐÅ´ó¼Ò¶¼Ê¹ÓùýSQL SERVER¡£½ñÌì¸ø´ó¼Ò¼òµ¥½éÉÜÒ»ÏÂOracle SQLÓëANSI SQLÇø±ð¡£Æäʵ£¬SQL SERVERÓëÓëANSI SQLÒ²ÓÐÇø±ð¡£
1¡¢Ê×ÏÈ´ó¼ÒÒªÃ÷°×ʲôÊÇANSI
ANSI£ºÃÀ¹ú¹ú¼Ò±ê׼ѧ»á£¨American National Standards Institute£©¡£µ±Ê±£¬ÃÀ¹úµÄÐí¶àÆóÒµºÍרҵ¼¼ÊõÍÅÌ壬ÒÑ¿ªÊ¼Á˱ê×¼»¯¹¤×÷£¬µ«Òò±Ë ......

´ÓOracle¡¢SQLServerÖÐÈ¡µÃ×¢ÊÍ

¸ù¾Ý±í½á¹¹Éú³ÉJavaÎļþµÄ¹¤¾ß£¬ÔÚÈ¡µÃ±íµÄ×Ö¶ÎʱÈçºÎÈ¡µÃ±íµÄ¸÷ÖÖÐÅÏ¢ºÍ×¢ÊÍ£¬¾­¶à·½ËÑÑ°ÕÒµ½ÈçÏÂ×ÊÁϱ¸Ó㺠oracle£º
        user_tab_comments;±í×¢ÊÍ
        user_col_comments;±í×Ö¶Î×¢ÊÍ
        Ò ......

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¿ØÖÆ·ÖÒ³²éѯµÄÿҳµÄ·¶Î§¡£
ÉÏÃæ¸ø³öµÄÕâ¸ö·ÖÒ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ