Results 1 to 3 of 3
  1. #1
    Join Date
    May 2003
    Posts
    3

    Unanswered: How to concat two or more tables in a view

    Asume we have two tables
    TBL_1 and TBL_2 are identical

    CREATE TABLE TBL_2
    (
    NAME VARCHAR2(255)
    )

    TBL_1.Name = Thomas
    TBL_2.Name = Mihatsch

    How to create a view displaying
    Thomas
    Mihatsch

  2. #2
    Join Date
    Nov 2002
    Location
    Desk, slightly south of keyboard
    Posts
    697
    Hi Thomas,

    create or replace view myview as
    select * from tbl_1
    union all
    select * from tbl_2;

    Hth
    Bill

  3. #3
    Join Date
    May 2003
    Posts
    87
    and if you want the duplicates eliminated :

    create or replace view myview as
    select * from tbl_1
    union
    select * from tbl_2;

Posting Permissions

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