SQL: how to select IDs according to a condition? -


i started program in sql , have bit of problem (n.b., working of tabl come game). table this, id refers single person, h hour of playing , if condition:

id  h  if  01  1  0 01  2  0 01  3  0 02  1  0 02  2  1 03  1  0 03  2  1 03  3  0 03  4  1 

in case player 01 played 3 hours, player 02 2 hours , player 03 4 hours. in each of these hours may or may have not performed action. if did, 1 appears in if column.

now, doubt is: how can query have table id of people never performed action? not want rule out row if = 1, want rule out row id. in case should become:

01  1  0 01  2  0 01  3  0 

any help?

this should it.

select * table id not in (select id table if = 1) 

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 -