I have two tables as shown
Table1:
| ldt | swpn | nomenclature | planned | combined |
Table2:
| lmt | name | combination |
I have to achieve:
Check if the value in column "combination" exists in the column "combined".
If it exists printout the corresponding | lmt | name | combination |
Use an INNER JOIN, its used to get results from both tables on the LEFT and RIGHT of the JOIN
SELECT t2.lmt, t2.name, t2.combination
FROM
t1
INNER JOIN t2 ON t1.combined=t2.combination
SELECT Table2.lmt, Table2.name, Table2.combination FROM Table1, Table2 WHERE Table2.combination=Table1.combined