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

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -