1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | -- 獲得存儲(chǔ)過(guò)程創(chuàng)建語(yǔ)句 select o.xtype,o. name ,cm.text from syscomments cm inner join sysobjects o on o.id=cm.id where xtype = 'p' order by o.xtype,o. name ,cm.text -- 獲得視圖程創(chuàng)建語(yǔ)句 select o.xtype,o. name ,cm.text from syscomments cm inner join sysobjects o on o.id=cm.id where xtype = 'v' order by o.xtype,o. name ,cm.text -- 查詢(xún)所有表名、字段名、類(lèi)型、長(zhǎng)度 select o. name , c. name ,t. name ,c.length from syscolumns c inner join systypes t on c.xtype= t.xtype inner join sysobjects o on c.id= o.id where o.xtype= 'u' order by o. name , c. name ,t. name -- 所有數(shù)據(jù)都來(lái)自于這四張表 --select * from sysobjects --select * from syscolumns --select * from syscomments --select * from systypes |
聯(lián)系客服