标签:ase object sys 注意 备份 proc function 拼接 cts
注意:进行此操作前需先备份数据库,免得删错无法恢复
1.查询
SELECT Name ,type FROM SysObjects WHERE name LIKE ‘%cases%‘
2.拼接语句
SELECT ‘drop Procedure ‘+ Name FROM SysObjects WHERE name LIKE ‘%cases%‘ AND type=‘p‘; SELECT ‘drop view ‘+ Name FROM SysObjects WHERE name LIKE ‘%cases%‘ AND type=‘v‘; SELECT ‘drop table ‘+ Name FROM SysObjects WHERE name LIKE ‘%cases%‘ AND type=‘u‘; SELECT ‘drop function ‘+ Name FROM SysObjects WHERE name LIKE ‘%cases%‘ AND type=‘fn‘
3.执行删除语句
标签:ase object sys 注意 备份 proc function 拼接 cts
原文地址:http://www.cnblogs.com/kangjing/p/6030482.html