1

I am trying to compare two columns from two databases, and create a list of users that are missing from the second table.

This is what I have, and of course it gives me an error. Does anyone have any suggestions?

Thanks.

SELECT UserId FROM db1.users
NOT IN
(SELECT UserId FROM db2.users)
Bubba
  • 140
  • 1
  • 9
  • The `EXCEPT` operation would be a good fit here. Unfortunately MySQL doesn't support `EXCEPT`. But you can see the duplicate how to work around that. – sticky bit Dec 09 '20 at 02:32

0 Answers0