锘??xml version="1.0" encoding="utf-8" standalone="yes"?>91久久精品网,91精品1区,亚洲人成人一区二区在线观看 http://www.aygfsteel.com/monokurobo/category/44862.htmlzh-cnWed, 28 Apr 2010 02:06:38 GMTWed, 28 Apr 2010 02:06:38 GMT60鍏充簬Oracle涓嶴qlServer涓幏鍙栨墍鏈夊瓧孌點(diǎn)佷富閿佸閿?/title><link>http://www.aygfsteel.com/monokurobo/articles/319556.html</link><dc:creator>cjm</dc:creator><author>cjm</author><pubDate>Wed, 28 Apr 2010 00:52:00 GMT</pubDate><guid>http://www.aygfsteel.com/monokurobo/articles/319556.html</guid><wfw:comment>http://www.aygfsteel.com/monokurobo/comments/319556.html</wfw:comment><comments>http://www.aygfsteel.com/monokurobo/articles/319556.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/monokurobo/comments/commentRss/319556.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/monokurobo/services/trackbacks/319556.html</trackback:ping><description><![CDATA[  <p><span style="font-size: 14pt"><strong>鍏充簬</strong></span><strong><span style="font-family: 'Arial', 'sans-serif'; color: red; font-size: 14pt">Oracle</span></strong><strong><span style="font-size: 14pt">涓?/span></strong><strong><span style="font-family: 'Arial', 'sans-serif'; color: red; font-size: 14pt">SqlServer</strong></span><strong><span style="font-size: 14pt">涓幏鍙栨墍鏈夊瓧孌點(diǎn)佷富閿佸閿?/span></strong></p> <p><span style="font-family: 'Arial', 'sans-serif'"><br /> </span><strong>錛堜竴錛?/strong><strong><span style="font-family: 'Arial', 'sans-serif'">Oracle</span></strong><span style="font-family: 'Arial', 'sans-serif'">:<br /> </span><span style="font-family: 'Arial', 'sans-serif'">1</span>銆佹煡璇㈡煇涓〃涓殑瀛楁鍚嶇О銆佺被鍨嬨佺簿搴︺侀暱搴︺佹槸鍚︿負(fù)絀?span style="font-family: 'Arial', 'sans-serif'"><br /> select COLUMN_NAME,DATA_TYPE,DATA_PRECISION,DATA_SCALE,NULLABLE <br /> from user_tab_columns <br /> where table_name ='YourTableName'<br /> </span><span style="font-family: 'Arial', 'sans-serif'">2</span>銆佹煡璇㈡煇涓〃涓殑涓婚敭瀛楁鍚?span style="font-family: 'Arial', 'sans-serif'"><br /> select col.column_name <br /> from user_constraints con,  user_cons_columns col <br /> where con.constraint_name = col.constraint_name <br /> and con.constraint_type='P' <br /> and col.table_name = 'YourTableName'<br /> </span><span style="font-family: 'Arial', 'sans-serif'">3</span>銆佹煡璇㈡煇涓〃涓殑澶栭敭瀛楁鍚嶇О銆佹墍寮曠敤琛ㄥ悕銆佹墍搴旂敤瀛楁鍚?span style="font-family: 'Arial', 'sans-serif'"><br /> select distinct(col.column_name),r.table_name,r.column_name <br /> from <br /> user_constraints con,<br /> user_cons_columns col, <br /> (select t2.table_name,t2.column_name,t1.r_constraint_name <br />  from user_constraints t1,user_cons_columns t2 <br />  where t1.r_constraint_name=t2.constraint_name <br />  and t1.table_name='YourTableName'<br />  ) r <br /> where con.constraint_name=col.constraint_name <br /> and con.r_constraint_name=r.r_constraint_name <br /> and con.table_name='YourTableName'</span></p> <p><strong>錛堜簩錛?/strong><strong><span style="font-family: 'Arial', 'sans-serif'">SQLServer</strong></span><strong>涓殑瀹炵幇錛?/strong><span style="font-family: 'Arial', 'sans-serif'"><br /> </span><span style="font-family: 'Arial', 'sans-serif'">1</span>銆佸瓧孌碉細(xì)<span style="font-family: 'Arial', 'sans-serif'"><br /> SELECT c.name,t.name,c.xprec,c.xscale,c.isnullable <br /> FROM systypes t,syscolumns c <br /> WHERE t.xtype=c.xtype <br /> AND c.id = (SELECT id FROM sysobjects WHERE name='YourTableName') <br /> ORDER BY c.colid</span></p> <p><span style="font-family: 'Arial', 'sans-serif'">2</span>銆佷富閿紙鍙傝?span style="font-family: 'Arial', 'sans-serif'">SqlServer</span>緋葷粺瀛樺偍榪囩▼<span style="font-family: 'Arial', 'sans-serif'">sp_pkeys</span>錛夛細(xì)<span style="font-family: 'Arial', 'sans-serif'"><br /> select COLUMN_NAME = convert(sysname,c.name)               <br /> from                                                       <br /> sysindexes i, syscolumns c, sysobjects o                   <br /> where o.id = object_id('[YourTableName]')                  <br /> and o.id = c.id                                            <br /> and o.id = i.id                                            <br /> and (i.status & 0x800) = 0x800                             <br /> and (c.name = index_col ('[YourTableName]', i.indid,  1) or     <br />      c.name = index_col ('[YourTableName]', i.indid,  2) or     <br />      c.name = index_col ('[YourTableName]', i.indid,  3) or     <br />      c.name = index_col ('[YourTableName]', i.indid,  4) or     <br />      c.name = index_col ('[YourTableName]', i.indid,  5) or     <br />      c.name = index_col ('[YourTableName]', i.indid,  6) or     <br />      c.name = index_col ('[YourTableName]', i.indid,  7) or     <br />      c.name = index_col ('[YourTableName]', i.indid,  8) or     <br />      c.name = index_col ('[YourTableName]', i.indid,  9) or     <br />      c.name = index_col ('[YourTableName]', i.indid, 10) or     <br />      c.name = index_col ('[YourTableName]', i.indid, 11) or     <br />      c.name = index_col ('[YourTableName]', i.indid, 12) or     <br />      c.name = index_col ('[YourTableName]', i.indid, 13) or     <br />      c.name = index_col ('[YourTableName]', i.indid, 14) or     <br />      c.name = index_col ('[YourTableName]', i.indid, 15) or     <br />      c.name = index_col ('[YourTableName]', i.indid, 16)       <br />      )</span></p> <p><span style="font-family: 'Arial', 'sans-serif'">3</span>銆佸閿細(xì)<span style="font-family: 'Arial', 'sans-serif'"><br /> select t1.name,t2.rtableName,t2.name <br /> from <br /> (select col.name, f.constid as temp <br />  from syscolumns col,sysforeignkeys f <br />  where f.fkeyid=col.id <br />  and f.fkey=col.colid <br />  and f.constid in <br />  ( select distinct(id)  <br />    from sysobjects <br />    where OBJECT_NAME(parent_obj)='YourTableName' <br />    and xtype='F' <br />   ) <br />  ) as t1 , <br /> (select OBJECT_NAME(f.rkeyid) as rtableName,col.name, f.constid as temp <br />  from syscolumns col,sysforeignkeys f <br />  where f.rkeyid=col.id <br />  and f.rkey=col.colid <br />  and f.constid in <br />  ( select distinct(id) <br />    from sysobjects <br />    where OBJECT_NAME(parent_obj)='YourTableName' <br />    and xtype='F' <br />  ) <br /> ) as t2 <br /> where t1.temp=t2.temp</span></p> <img src ="http://www.aygfsteel.com/monokurobo/aggbug/319556.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/monokurobo/" target="_blank">cjm</a> 2010-04-28 08:52 <a href="http://www.aygfsteel.com/monokurobo/articles/319556.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> 主站蜘蛛池模板: <a href="http://" target="_blank">淅川县</a>| <a href="http://" target="_blank">郓城县</a>| <a href="http://" target="_blank">泊头市</a>| <a href="http://" target="_blank">龙海市</a>| <a href="http://" target="_blank">贡觉县</a>| <a href="http://" target="_blank">安庆市</a>| <a href="http://" target="_blank">水城县</a>| <a href="http://" target="_blank">丁青县</a>| <a href="http://" target="_blank">周至县</a>| <a href="http://" target="_blank">温泉县</a>| <a href="http://" target="_blank">离岛区</a>| <a href="http://" target="_blank">垣曲县</a>| <a href="http://" target="_blank">宁夏</a>| <a href="http://" target="_blank">芷江</a>| <a href="http://" target="_blank">东乌珠穆沁旗</a>| <a href="http://" target="_blank">玉屏</a>| <a href="http://" target="_blank">香港 </a>| <a href="http://" target="_blank">章丘市</a>| <a href="http://" target="_blank">来安县</a>| <a href="http://" target="_blank">襄垣县</a>| <a href="http://" target="_blank">五家渠市</a>| <a href="http://" target="_blank">黔西</a>| <a href="http://" target="_blank">宜黄县</a>| <a href="http://" target="_blank">营口市</a>| <a href="http://" target="_blank">奉节县</a>| <a href="http://" target="_blank">徐汇区</a>| <a href="http://" target="_blank">武胜县</a>| <a href="http://" target="_blank">大安市</a>| <a href="http://" target="_blank">富宁县</a>| <a href="http://" target="_blank">应用必备</a>| <a href="http://" target="_blank">湖南省</a>| <a href="http://" target="_blank">额济纳旗</a>| <a href="http://" target="_blank">双桥区</a>| <a href="http://" target="_blank">屏东县</a>| <a href="http://" target="_blank">望奎县</a>| <a href="http://" target="_blank">额尔古纳市</a>| <a href="http://" target="_blank">潢川县</a>| <a href="http://" target="_blank">南川市</a>| <a href="http://" target="_blank">越西县</a>| <a href="http://" target="_blank">宁乡县</a>| <a href="http://" target="_blank">光山县</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>