Jump to content

join two tables and return missing rows


nabeel21

Recommended Posts

Here are 2 tables which share the same columns (CITY and COUNTY)

 

TB1 (Main table that stores the info of all cities and counties)

 

CITY-------------------------COUNTY

---------------------------------------

Tampa----------------------Hillsborough

Orlando---------------------Orange

Frostproof-------------------Polk

Arcadia----------------------Desoto

County----------------------Collier

Tallahassee-----------------Leon

----------------------------------------------

 

TB2 (Contains info for all cities and counties who have submitted data)

 

CITY--------------------------COUNTY

---------------------------------------

Arcadia----------------------Desoto

County----------------------Collier

Tallahassee-----------------Leon

------------------------------------------------

 

Now I want to query TB1 and find out which city/county has NOT submitted their data.

 

The query should return

 

CITY-------------------------COUNTY

----------------------------------------

Tampa----------------------Hillsborough

Orlando---------------------Orange

Frostproof------------------Polk

 

 

Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/1193-join-two-tables-and-return-missing-rows/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.