展开全部
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
--exec SP_ProcName N'1'
create proc SP_ProcName
@p1 char(2)='0'
as
begin
declare @sql nvarchar(2000)
set @sql='select *from a where id='+@p1
exec(@sql)
end
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
GO
SET ANSI_NULLS ON
GO
--exec SP_ProcName N'1'
create proc SP_ProcName
@p1 char(2)='0'
as
begin
declare @sql nvarchar(2000)
set @sql='select *from a where id='+@p1
exec(@sql)
end
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询