Can we use Order by on a column that is not part of selected columns? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can we use Order by on a column that is not part of selected columns?

Order by SQL

18th Dec 2016, 9:39 AM
Doni
Doni - avatar
2 Answers
+ 2
Yes you can. For example you have a database "people" with columns: name, surname, age. It is correct query: SELECT name, surname FROM people ORDER BY age;
18th Dec 2016, 2:01 PM
Adam Emieljaniuk
Adam Emieljaniuk - avatar
0
Okay
18th Dec 2016, 2:06 PM
Doni
Doni - avatar