get non matching results from one table compared to another
Posted: Fri Jan 23, 2004 1:40 pm
Hello,
I have a table in which i one to display the information of table 1 based on the fact that their id doesnt exist in another table
I had the above query but i still get results whose values ID that appears in both tables
I thought that a LEFT-JOIN gave results that DONT match???!! when it comes to understanding the types of joins i really am stumnped as to how they work and event a simple
Kendall
I have a table in which i one to display the information of table 1 based on the fact that their id doesnt exist in another table
Code: Select all
table 1
ID FIELD 1 yada yada
table 2
ID FIELD 2 yada yada
SELECT banner_images.ID, file, description, class, banner_images.grouping FROM banner_images LEFT JOIN banner_stats ON banner_images.ID = banner_stats.ID GROUP BY banner_images.ID HAVING class = 'A' AND banner_images.grouping != 'B' ORDER BY RAND() LIMIT 1I thought that a LEFT-JOIN gave results that DONT match???!! when it comes to understanding the types of joins i really am stumnped as to how they work and event a simple
gives me results that exists in both tables.WHERE table1_id != table2_id
Kendall