Re: Search Query
Posted by:
Rick James
Date: August 31, 2010 08:48AM
That can be simplified to
(SELECT * FROM tablename1)
UNION ALL
(SELECT * FROM tablename2)
ORDER BY columnname;
The tables do not have to be identical, but the number of fields in the SELECT need to be the same:
(SELECT a, b FROM tablename1)
UNION ALL
(SELECT xxx, yyy FROM tablename2)
UNION ALL
(SELECT 12, 'abcdef' FROM tablename2)
ORDER BY columnname;
The datatypes ought to be the same.
Subject
Written By
Posted
Re: Search Query
August 31, 2010 08:48AM
September 01, 2010 11:11AM
September 01, 2010 11:35AM
September 01, 2010 12:40PM
September 01, 2010 02:14PM
September 01, 2010 02:18PM
Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.