建立还是调用? 如果是在过程里建立过程就: declare @x varchar(8000) if object_id('new_proce') is not null drop procedure new_proce set @x='create procedure new_proce as return 0' exec @x
我用了,调用存储过程去建立存储过程new_proce出现错误,
create procedure #x as declare @x varchar(8000) if object_id('new_proce') is not null drop procedure new_proce set @x='create procedure new_proce as return 0' exec (@x)go exec #x go
如果是在过程里建立过程就:
declare @x varchar(8000)
if object_id('new_proce') is not null
drop procedure new_proce
set @x='create procedure new_proce
as
return 0'
exec @x
as
declare @x varchar(8000)
if object_id('new_proce') is not null
drop procedure new_proce
set @x='create procedure new_proce
as
return 0'
exec (@x)go
exec #x
go