sql - how to select for multiple column values including NULL without repeating column name? -


so far i'm doing way:

select * table_name column in(var1,var2,var3) or column null 

i have issues repeating column name 2 times here since in() can't take null argument, returns no error, 0 columns. (maybe magic variables can refer last called column ?)

this:

'column' 

is string literal, not column name. this:

'column' in(var1,var2,var3) or 'column' null 

won't match unless var1, var2, or var3 happen string 'column'. try dropping quotes on column name:

select * table_name column in (var1, var2, var3) or column null 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -