自动生成插入、更新和删除的存储过程



如何在SQL Server中自动为特定或所有表生成插入和更新存储过程?

有可能吗?提前感谢

有很多工具可以帮你做到这一点,有些是免费的,有些是需要付费的。这里有一个简单的源代码,你可以改编:

http://www.codeproject.com/Articles/19280/Stored-Procedure-Generator

这是一个SSMS插件,也是免费的(或者根据你选择的版本收取少量费用)

http://www.ssmstoolspack.com/

-- It is for std table
create proc std_delete
@id int
as begin
delete from std  where id=@id
end
execute  std_delete  2
-- SP for delete
--Now u can c
select * from std

最新更新