sql - Intersect table with different column value -


i have table:

num type flag --- ---- ---- 11      1 12      1 13      1 14      1 15      1  12   b    2 13   b    2 

how write query following result:

num type flag --- ---- ---- 11       1 14       1 15       1 

select num your_table num not in (   select num   your_table   type = 'b' ) 

Comments

Popular posts from this blog

vb.net - Alternative to the T-SQL AS keyword -

php - MySQLi binding parameters in a prepared statement doesn't work unless inserted after "WHERE" -

ios - CFRelease causing crash in iPad application -