Shamrox Posted March 6, 2007 Share Posted March 6, 2007 I am sure this is pretty basic but i can't find anywhere the syntax for this. I have two tables, I want to know all the records that are in Table A, but not in Table B. Basically, if it finds a matching ID it wouldn't include that in the output. Help? Quote Link to comment https://forums.phpfreaks.com/topic/41483-comparison-query/ Share on other sites More sharing options...
artacus Posted March 6, 2007 Share Posted March 6, 2007 SELECT tabA.* FROM tabA LEFT JOIN tabB ON tabA.id = tabB.a_id WHERE tabB.a_id IS NULL Quote Link to comment https://forums.phpfreaks.com/topic/41483-comparison-query/#findComment-200983 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.