create procedure pro_aaa
(
@canshu1 nvarchar(200),
@canshu2 nvarchar(200)
)
as
begin
declare @strsql nvarchar(2000)
set @strsql=‘select * from table1 where 1=1‘+@canshu1
exec(@strsql)
end
原文地址:http://www.cnblogs.com/yubufan/p/3791890.html