I've got some SQL code working at the moment but I need to do another union. I want to ensure what I do is correct. Currently, this is what I have:
select * from (select * from stametadata
union select * from stajjmetadata)
I want to union on another table. Would this be correct?
select * from (select * from stametadata
union select * from stajjmetadata
union select * from staggmetadata)
Is this the neatest way to do it?
CodePudding user response:
You can chain union
s. To be honest, you don't even need the outer query:
SELECT * FROM stametadata
UNION
SELECT * FROM stajjmetadata
UNION
SELECT * FROM staggmetadata