sql - Checking for two fields in a record -
sql - Checking for two fields in a record -
i trying eliminate records both fields match given values table.
select code, num table_a (code not in (select code table_b) , num not in (select num table_b)) however seems eliminate records have either of these values. need eliminate records have both matching given record table2. or seems counter-intuitive here?
select code, num table_a ta not exists (select 1 table_b tb tb.code=ta.code) , not exists (select 1 table_b tb tb.num=ta.num)
sql
Comments
Post a Comment