根据条件比较不同表中的两列

I have two tables as shown

Table1:

| ldt    | swpn   | nomenclature | planned | combined     |

Table2:

| lmt | name | combination |

I have to achieve:

  1. Check if the value in column "combination" exists in the column "combined".

  2. 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