Results 1 to 2 of 2

Thread: 'OR' between two tables

  1. #1
    Join Date
    Dec 2002

    'OR' between two tables

    I have 2 tables say tableA and tableB
    tableA has columns - A,B,C1
    tableb has columns - A,B,C2
    I need rows from tableA and tableB - A,B,C1,C2
    when data is there is either in C1 or C2 or both.

    Please suggest how do I write such query.

  2. #2
    Join Date
    Nov 2002
    New Jersey, USA
    If it is ANSI compliant database (e.g. SQL 2000)

    select t1.a, t1.b, t1.c1, t2.c2
    from tableA as t1
    full outer join tableB as t2
    on t1.a = t2.a and t1.b = t2.b

Posting Permissions

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