[英]is it possible to create a stored proc from a stored proc?
使用sql server2014。被要求創建所有存儲過程,並查看是否可以從存儲過程中進行操作嗎?
當然可以這樣:
create procedure creatorproc
as
begin
declare @sql as nvarchar(max);
set @sql = 'create procedure newproc as begin select ''hello''; end; '
exec(@sql);
end;
go
exec creatorproc ;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.