讀出數據庫所有table and proc 名稱
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