I have tables like this:
CheckTable
(id) (user_id)
[0] [403]
UserTable
(id) (username)
[403] [hello]
I want to select only the rows from the UserTable
that do not have the user id row in the CheckTable
I could just select all the users, loop through the rows and then run another query checking if the user_id
is in the UserTable
, but that would be slow.
Is there any MySQL query that could join and select.
NOT EXISTS
condition. What have you tried so far?