{"id":1595,"date":"2024-05-08T15:03:22","date_gmt":"2024-05-08T07:03:22","guid":{"rendered":"http:\/\/oneai.eu.org\/?p=1595"},"modified":"2024-05-08T15:03:22","modified_gmt":"2024-05-08T07:03:22","slug":"%e6%9f%a5%e8%af%a2-%e6%b7%bb%e5%8a%a0-%e5%88%a0%e9%99%a4-%e8%a1%a8%e7%9a%84%e4%b8%bb%e9%94%ae","status":"publish","type":"post","link":"https:\/\/oneai.eu.org\/?p=1595","title":{"rendered":"\u67e5\u8be2 \u6dfb\u52a0\/\u5220\u9664 \u8868\u7684\u4e3b\u952e"},"content":{"rendered":"<pre><code class=\"language-sql\">SELECT * FROM ALL_IND_COLUMNS WHERE ROWNUM&lt;3;\n\u67e5\u8be2\u8868\u7684\u4e3b\u952e1\uff1a\nSelect t.*, i.Index_Type\nFrom User_Ind_Columns t, User_Indexes i\nWhere t.Index_Name = i.Index_Name And t.Table_Name = i.Table_Name \nAnd t.Table_Name Like &#039;%HSC_SUBS_PRODUCT%&#039;;\n\u67e5\u8be2\u8868\u7684\u4e3b\u952e2:(\u597d)\nSelect a.Constraint_Name, a.Column_Name\nFrom User_Cons_Columns a, User_Constraints b\nWhere a.Constraint_Name = b.Constraint_Name And b.Constraint_Type = &#039;P&#039; \nAnd a.Table_Name Like &#039;%HSC_SUBS_PRODUCT%&#039;;\n\n\u67e5\u627e\u8868\u7684\u552f\u4e00\u6027\u7ea6\u675f\uff08\u5305\u62ec\u540d\u79f0\uff0c\u6784\u6210\u5217\uff09\nSelect Column_Name\nFrom User_Cons_Columns Cu, User_Constraints Au\nWhere Cu.Constraint_Name = Au.Constraint_Name And Au.Constraint_Type = &#039;u&#039; And Au.Table_Name=UPPER(&#039;hsc_chg_req&#039;);\n\n5\u3001\u67e5\u8be2\u8868\u7684\u6240\u6709\u5217\u53ca\u5176\u5c5e\u6027\nSelect t.*, c.Comments\nFrom User_Tab_Columns t, User_Col_Comments c\nWhere t.Table_Name = c.Table_Name And t.Column_Name = c.Column_Name And t.Table_Name = \u8981\u67e5\u8be2\u7684\u8868......\n\nalter table FSHSC.HSC_SUBS_ATTRINFO2001\n   add constraint PK_HSC_SUBS_ATTRINFO2001 primary key (SUB_ATTACH_ID);\n\n--alter table GDHSC.HSC_SUBS_ATTRINFO2001\n   drop primary key cascade;\n\n--drop table GDHSC.HSC_SUBS_ATTRINFO2001 cascade constraints;\n\nSelect a.Constraint_Name, a.Column_Name\nFrom User_Cons_Columns a, User_Constraints b\nWhere a.Constraint_Name = b.Constraint_Name And b.Constraint_Type = &#039;P&#039; \nAnd a.Table_Name Like &#039;%HSC_SUBS_PRODUCT%&#039;;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>SELECT * FROM ALL_IND_COLUMNS WHERE ROWNUM&lt;3; \u67e5\u8be2\u8868\u7684\u4e3b\u952e1\uff1a 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 Like &#039;%HSC_SUBS_PRODUCT%&#039;; \u67e5\u8be2\u8868\u7684\u4e3b\u952e2:(\u597d) Select a.Constraint_Name, a.Column_Name From User_Cons_Columns a, User_Constraints b Where a.Constraint_Name = b.Constraint_Name And b.Constraint_Type = &#039;P&#039; And a.Table_Name Like &#039;%HSC_SUBS_PRODUCT%&#039;; \u67e5\u627e\u8868\u7684\u552f\u4e00\u6027\u7ea6\u675f\uff08\u5305\u62ec\u540d\u79f0\uff0c\u6784\u6210\u5217\uff09 Select Column_Name From User_Cons_Columns Cu, User_Constraints Au Where Cu.Constraint_Name = Au.Constraint_Name And Au.Constraint_Type = &#039;u&#039; And Au.Table_Name=UPPER(&#039;hsc_chg_req&#039;); 5\u3001\u67e5\u8be2\u8868\u7684\u6240\u6709\u5217\u53ca\u5176\u5c5e\u6027 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 = \u8981\u67e5\u8be2\u7684\u8868&#8230;&#8230; alter table FSHSC.HSC_SUBS_ATTRINFO2001 add constraint PK_HSC_SUBS_ATTRINFO2001 primary key (SUB_ATTACH_ID); &#8211;alter table GDHSC.HSC_SUBS_ATTRINFO2001 drop primary key cascade; &#8211;drop table GDHSC.HSC_SUBS_ATTRINFO2001 cascade constraints; Select a.Constraint_Name, a.Column_Name From User_Cons_Columns a, User_Constraints b Where a.Constraint_Name = b.Constraint_Name And b.Constraint_Type = &#039;P&#039; And a.Table_Name Like &#039;%HSC_SUBS_PRODUCT%&#039;;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","footnotes":""},"categories":[88,82],"tags":[],"class_list":["post-1595","post","type-post","status-publish","format-standard","hentry","category-oracle","category-82"],"_links":{"self":[{"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/1595","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1595"}],"version-history":[{"count":1,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/1595\/revisions"}],"predecessor-version":[{"id":1596,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/1595\/revisions\/1596"}],"wp:attachment":[{"href":"https:\/\/oneai.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1595"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1595"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1595"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}