现在的位置: 首页 > 综合 > 正文

讀出數據庫所有table and proc 名稱

2013年06月08日 ⁄ 综合 ⁄ 共 507字 ⁄ 字号 评论关闭

select name from sysobjects
where name like 'usp_EB_Admin%'
and xtype='p'

select 'drop proc '+name from sysobjects
where name like 'usp_EB%'
and xtype='p'

select name from sysobjects
where name like 'EB%'
and xtype='u'

select name,length from syscolumns
where object_id('EB_Price_ApplyForOrder')=id
order by colid

select name,
(case xtype
 when 56 then 'int' when 231 then 'nvarchar' when 239 then 'nchar'
 when 61 then 'datetime' when 48 then 'tinyint' 
 else convert(nvarchar(10),xtype) end ) ,length
from syscolumns
where object_id('dbo.EB_Price_GetPOFromEForm')=id
order by colid

抱歉!评论已关闭.