mysql - SQL: select all unique values in table A which are not in table B -


i have table a

id  | name      | department ----------------------------- 0   | alice     | 1 0   | alice     | 2 1   | bob       | 1 

and table b

id  | name ------------- 0   | alice      

i want select unique ids in table not exist in table b. how can this?

select distinct id  tablea not exists (     select id      tableb      id = a.id ) 

Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -