Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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¶à±íÁªºÏ¸üÐÂ

ÒÔÏÂÊÇÔÚºǫ́¸üÐÂÒ×ÍØERPÊý¾Ý¿âʱÓöµ½µÄÒ»¸öÎÊÌâ:
1.ÔÚDB14Êý¾Ý¿âÖн«ÁϼþºÅP44¿ªÍ·,²¢ÇÒÆ·ÃûΪ"ËÜÁÏ´ü"µÄÁϼþ¸ÄΪÏûºÄÐÔÁϼþ.
          Õâ¸ö¼òµ¥:  UPDATE DB14.ima_file SET ima70 = ‘Y’ WHERE ima01 like ‘P44%’ AND ima0 ......

PL/SQLʵÏÖOracleÊý¾Ý¿âÈÎÎñµ÷¶È

 
     Ñ¡Ôñ×Ô softj µÄ Blog
¹Ø¼ü×Ö
  PL/SQLʵÏÖOracleÊý¾Ý¿âÈÎÎñµ÷¶È
³ö´¦
 
 
PL/SQLʵÏÖOracleÊý¾Ý¿âÈÎÎñµ÷¶È
¡¡¡¡¹Ø¼ü´Ê£ºÊý¾Ý»Ö¸´£¬ÈÎÎñµ÷¶È£¬ORACLE£¬PL/SQL
¡¡¡¡ÔÚÊý¾Ý¿â²Ù×÷ÖÐʱ³£»áÓÐÕâÑùµÄÇé¿ö·¢Éú£¬ÓÉÓÚһʱµÄÊèºö¶øÎóɾ»òÎó¸ÄÁËһЩÖØÒªµÄÊý¾Ý£¬ÁíÍ⻹ÓÐ ......

oracle±Ê¼Ç

½ñÌìÖØÐÂÕûÀíµçÄÔ£¬ÕÒµ½Ò»¸öÎļþ£¬¿´ÁËÏÂÈÕÆÚ£¨2006.11.3£© £¬Å²»Ð¡ÐÄÔÙ¶ªÁË£¬´æµ½ÍøÉÏÀ´É¹É¹¡£
SQL ÓïÑÔ·ÖÀࣺ
1  DDL£¨Êý¾Ý¶¨Òå £©ÓÃÓÚ´´½¨ºÍ¶¨ÒåÊý¾Ý¿â¶ÔÏ󣬲¢ÇÒ½«¶ÔÕâЩ¶ÔÏóµÄ¶¨Òå±£´æÔÚÊý¾Ý×ÖµäÖС£
creat  table     ´´½¨±í
alter  table     ÐÞ¸ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ