• select

    *

    from

    TableA ta

    inner join TableB tb

    on (ta.Col1 = tb.Col1

    and ta.Col2 = tb.Col2)

    hth