+ 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 ;

19th Nov 2021, 8:42 PM
Ayoub Dekhil
Ayoub Dekhil - avatar
2 Réponses
+ 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;
19th Nov 2021, 11:12 PM
SoloProg
SoloProg - avatar
+ 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
20th Nov 2021, 8:01 AM
Ipang