+ 1
Hi , Is ""order by"" used after the combination of the tabels in the memory of the computer or just for the second table ?
SELECT norwaychess.player,norwaychess.country ,norwaychess.birthyear,norwaychess.rating from norwaychess UNION SELECT tatasteel.player,tatasteel.country ,tatasteel.birthyear ,tatasteel.rating from tatasteel ORDER by rating DESC ;
2 Answers
+ 4
-- After the combination of the tables
SELECT n.player, n.country, n.birthyear, n.rating
FROM norwaychess AS n
UNION
SELECT t.player, t.country, t.birthyear, t.rating
FROM tatasteel AS t
ORDER BY rating DESC;
+ 1
Hello Ayoub,
Next time please avoid writing code into the tags, just put in there a specific language (SQL) that is relevant to the question.
What is "relevant tags" in forum?
https://code.sololearn.com/W3uiji9X28C1/?ref=app