Multiply Select Rows in one query

  • Hello, I'm new here. I do have one question in regards of forming up a select query.

    Imagine I have two tables: Tab_A and Tab_B

    Tab_A has 3 columns and the datas are as follows:

    Col1 == Col2 == Col3
    A==B==C
    D==E==F

    Tab_B has just 1 column

    ColB
    X
    Y

    I want to select something to print Tab_A and add up a new Column which takes data from Tab_B, the result would be as follows

    Col1 == Col2 == Col3 == Col4
    A==B==C==X
    A==B==C==Y
    D==E==F==X
    D==E==F==Y

    I'm not sure what I should use on this. Can anyone help?

    Thank you.

  • SELECT TabA.Col1, TablA.Col2, TabA.Col3, TabB.X, TabB.Y
    FROM TabA CROSS JOIN TabB

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply