MySQL - All from one table, not if in other

I have a table called Master, with a field in it called Unique.

I have a separate table, called tblLock, also with a field called Unique (both varchar)

I want a view of all the records in Master, UNLESS the unique fields match.  So the tblLock table excludes records from Master.

Thanks
LVL 1
Rush_2112Asked:
Who is Participating?
 
ralmadaCommented:
you can try

select a.id, a.col1, a.col2
from Master a
left join tblLock b on a.id = b.id
where b.id is null
0
 
Rush_2112Author Commented:
I found that this works:

AND (Manager_Filter.`Unique` NOT IN (Select `Unique` from tblLock))
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.