Reputation: 495
I have 2 tables with identical column layout but containing different data entered by year. I need to run a query that will find all the entries across both tables where the data in one of the specified columns is the same, such as:
id | serialNo | enteredBy | entryDate| processedBy | processDate ...
rows containing the same serial number (referencing the same item) in both tables.
Upvotes: 4
Views: 26
Reputation: 309
Try something like:
SELECT * FROM t1 INNER JOIN t2 ON (t1.serialNum = t2.serialNum)
Upvotes: 4