How to make a UNION query without same field order

elly.khanlar

Registered User.
Local time
Today, 18:07
Joined
Oct 3, 2019
Messages
23
Hi everyone,
I'm trying to make a union query of two tables but some of the fields are not in same sequent. Is there a way to create a union query with these two tables?
 
I guess you'll have to specify the fields then. In other words, if you can't do this:
Code:
select * from table1
union
select * from table2
Then you might have to do this:
Code:
select field1, field2, field3 from table1
union
select field4, field5, field6 from table2
 

Users who are viewing this thread

Back
Top Bottom