Subject | Combine 2 tables |
---|---|
Author | a_broekhuis |
Post date | 2004-06-07T11:58Z |
Hi,
How can i combine 2 tables without a where clause and so that i can
"rename" 1 field of each table to 1 single field in my resultset?
Table 1:
someName varchar,
someOtherStuff varchar,
....
Table 2:
otherName varchar,
otherStuff varchar,
....
Result:
name varchar, // Where name is either someName or otherName
someOtherStuff varchar, // if name is from someName not null
otherStuff varchar, // if name is from otherName not null
....
There is no field that has to be compared, i only want the total
selection of both tables with some fields renamed so they match the
same field name as the ones in the other table.
How can i combine 2 tables without a where clause and so that i can
"rename" 1 field of each table to 1 single field in my resultset?
Table 1:
someName varchar,
someOtherStuff varchar,
....
Table 2:
otherName varchar,
otherStuff varchar,
....
Result:
name varchar, // Where name is either someName or otherName
someOtherStuff varchar, // if name is from someName not null
otherStuff varchar, // if name is from otherName not null
....
There is no field that has to be compared, i only want the total
selection of both tables with some fields renamed so they match the
same field name as the ones in the other table.