create proc abc
(
@condition varchar(2000)
)
as
begin
declare @strsql varchar(8000)
set @strsql='select * from table1
where 1=1'+@condition+' order by id desc'
print @strsql
exec(@strsql)
end
create proc abc
(
@condition varchar(2000)
)
as
begin
declare @strsql varchar(8000)
set @strsql='select * from table1
where 1=1'+@condition+' order by id desc'
print @strsql
exec(@strsql)
end