Thursday, August 1, 2013

At least one column contains matching value

SELECT * FROM TABLE WHERE val1=1

union all

SELECT * FROM TABLE WHERE val2=1

union all

SELECT * FROM TABLE WHERE val3=1

union all

SELECT * FROM TABLE WHERE val4=1

union all

SELECT * FROM TABLE WHERE val5=1

union all

SELECT * FROM TABLE WHERE val6=1


Thanks and Regards, Prajesh Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful.


No comments:

Post a Comment