Concatenate two tables

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • baburk
    New Member
    • Oct 2006
    • 111

    Concatenate two tables

    hi all,

    I am having two tables with same number of rows and datatype like this,

    Table1

    Item

    1
    2
    3
    4
    5


    Table2

    Item

    1
    2
    3
    4
    5

    I want to join this two table like this

    Item1 Item2
    1 1
    2 2
    3 3
    4 4
    5 5


    There is no check condition.

    Anybody help me
  • amitpatel66
    Recognized Expert Top Contributor
    • Mar 2007
    • 2358

    #2
    Originally posted by baburk
    hi all,

    I am having two tables with same number of rows and datatype like this,

    Table1

    Item

    1
    2
    3
    4
    5


    Table2

    Item

    1
    2
    3
    4
    5

    I want to join this two table like this

    Item1 Item2
    1 1
    2 2
    3 3
    4 4
    5 5


    There is no check condition.

    Anybody help me
    [code=sql]

    SELECT Item1,Item2 FROM table1 t1, table2 t2 WHERE t1.item1 = t2.item2

    [/code]

    Comment

    Working...