i have the following sql query
select * from tblArea where AreaDescription in ('Processing1','Geology 66','Site Infrastructure')
currently it shows the records where AreaDescription in (‘Processing1′,’Geology 66′,’Site Infrastructure’)
but i need to pass value to in query which will be always true and show all the records.i know that i can use where clause
where 1=1
but here i need to use the in statement.is it possible?
I don’t understand why you need it and why you don’t want to add
where 1=1or omit theWHERE, but you could do it this way:Test: http://sqlfiddle.com/#!3/6e15d/1/0