DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: SQL question

  1. #1
    Join Date
    Jan 2005
    Posts
    221

    SQL question

    If I have set of tables in A user that does not exist in B user, and set of tables in B user doesn't exist in A user.

    I can do select all of the table in a minus table in A and samething for B, but the question is how can we combine these two into one???

    thanks,

  2. #2
    Join Date
    Jul 2000
    Posts
    521
    Can you please explain it again ?
    svk

  3. #3
    Join Date
    Sep 2005
    Posts
    278
    (SELECT * FROM tab1
    MINUS
    SELECT * FROM tab2)
    UNION
    (SELECT * FROM tab2
    MINUS
    SELECT * FROM tab1)

    Or

    (SELECT * FROM tab1
    union
    SELECT * FROM tab2)
    minus
    (SELECT * FROM tab1
    intersect
    SELECT * FROM tab2)

Posting Permissions

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


Click Here to Expand Forum to Full Width