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? 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 Link to comment https://forums.phpfreaks.com/topic/41483-comparison-query/#findComment-200983 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.