Reputation: 1013
How can I concatenate the data from both of these tables so as they appear to be in just 1 single table.
Table 1:
JobID,Company,Category,url,reference,description,etc...
Table 2:
JobID,EmployerID,CompanyName,Category,Status,Description,etc...
There are additional fields in both of these tables but basically there are matching information such as company, category, description, etc.
. that should match up correctly & I would like to display the matching columns from both tables in 1 SELECT
statement.
Example Desired results: (Mixed results from both tables)
(Source) JobID CompanyName Category Description
tbl1 1 ABC Liquor Sales Clerk Looking for someone...
tbl2 2 Tiffanys Salon Beauty Looking for someone...
tbl2 3 Barber Shop Beauty Looking for someone...
tbl1 4 Car Wash Services Looking for someone...
Upvotes: 0
Views: 45
Reputation: 6719
Use UNION
select company, category, description from First_Table
UNION
select CompanyName, category, Description from Second_Table
Following conditions should be satisfied,
Upvotes: 1