azure sql database - Is there a way to rewrite EXCEPT statements into NOT IN statements in SQL? -
i'm few weeks learning sql, , finished problem on homework assignment using in , not in. managed correct answer, however, used except clause, aren't allowed use yet. can tell, except , not in similar statements in sql, can't understand difference is. here's general format of query:
select * table x in ( select x /* ... subquery*/ except select x /* ... other subquery*/ )
is there way rewrite general query without using except statement? how except , not in differ each other in general?
edit: this other post seems have information, seems focus on exists , not in, have different purposes don't they?
this might understand difference between except , not in
except operator returns distinct rows left hand side table not exist in right hand side table.
on other hand, "not in" return rows left hand side table not present in right hand side table not remove duplicate rows result.