Try using
LEFT JOIN[
^] like this:
SELECT *
FROM tbl1
LEFT JOIN tbl2
ON tlb1.uid = tbl2.uid
WHERE tbl2.uid = NULL
OP remarked that the result was empty and he is right the statement should be:
SELECT tbl1.uid, tbl1.name
FROM tbl1
LEFT JOIN tbl2
ON tbl1.uid = tbl2.uid
WHERE tbl2.uid IS NULL
I also changed the
SELECT
as otherwise the
NULL
columns of
tbl2
are also shown.