Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2003
    Posts
    4

    Unanswered: Joining fields from different table horizontally

    Hi,

    I would like to do the following:

    Table1:
    Col1
    -----
    Apple
    Orange


    Table2:
    Col1
    -----
    Banana
    Lemon


    Resulting view:

    View:
    ------
    Apple
    Banana
    Lemon
    Orange


    i.e. I want to make a view that selects entries from different tables and put them in "one" column.


    Anybody knows an SQL statement that does this job?

  2. #2
    Join Date
    Aug 2003
    Posts
    2
    Here is the select statement:

    select col1 test_col from table1
    union
    select col2 test_col from table2;

    cheers!!!
    Ashutosh.

  3. #3
    Join Date
    Aug 2003
    Posts
    4
    thanx a lot!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •