SQL combination OR operator of result records -
my table like:
s_no b c 1 1 1 0 2 0 1 0 3 1 1 0 4 1 1 1
i want 'or' of a,b,c result when give s_no's 1,2 , 3,
result should like
a b c 1 1 0
you can achieve same max
select max(a), max(b), max(c) mytable s_no in (1,2)
you'll need cast if these bit columns
...max(cast(a bit))...
Comments
Post a Comment