select * from WORK_ORDER w
where w.PRIORITY!=‘dd’
and w.CREATOR_ID=‘2’
and 1=1
select * from WORK_ORDER w
where w.CREATOR_ID=‘2’
and 1=1
DECLARE @SQL AS varchar(100);
DECLARE @Colum as varchar(20;
SET @Column=‘id’
set @Column =‘select’+@Column+‘from WORK_ORDER’;
exec(@SQL)