Combine the results of two or more queries into a single result set.
Syntax: query_spec UNION [ALL] query_spec [...n ] ;
Each query_spec must return the same number of columns in the same order.
The column data types must be compatible.
ALL - Include duplicate rows in the results.
USE MyDatabase ;
SELECT MyCol_INT1, MyCol_STRING2
FROM MySchema.MyTable; UNION SELECT MyCol_INTA, MyCol_STRINGB
FROM MySchema.MyOtherTable; GO
"Eventually, all things merge into one, and a river runs through it. The river was cut by the world's great flood and runs over rocks from the basement of time. On some of the rocks are timeless raindrops. Under the rocks are the words, and some of the words are theirs. I am haunted by waters" - Norman Maclean
Equivalent Oracle command:
© Copyright SS64.com 1999-2013
Some rights reserved