Why an error occurs when I write a command like this? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why an error occurs when I write a command like this?

Select * from student limit 4 oder by marks;

23rd Dec 2021, 12:30 PM
Sonu Rajput
Sonu Rajput - avatar
6 Answers
+ 1
Try this: SELECT * FROM 'student' ORDER BY marks limit 4;
23rd Dec 2021, 12:53 PM
Priyanka Singh
Priyanka Singh - avatar
+ 1
Yaah! it works
23rd Dec 2021, 1:05 PM
Sonu Rajput
Sonu Rajput - avatar
+ 1
The ORDER BY clause goes first and then the LIMIT The clauses have an fixed order
10th Jan 2022, 2:35 PM
Jeyfer Ortega Nuñez
0
Thanks 👍
23rd Dec 2021, 12:54 PM
Sonu Rajput
Sonu Rajput - avatar
0
But I don't understand why my command is wrong
23rd Dec 2021, 12:55 PM
Sonu Rajput
Sonu Rajput - avatar
0
Did it work?
23rd Dec 2021, 1:01 PM
Priyanka Singh
Priyanka Singh - avatar