Home »
MCQs »
MariaDB MCQs
Which of the following query is correct to get the first two names from 'students' table, ordered alphabetically?
18. Which of the following query is correct to get the first two names from 'students' table, ordered alphabetically?
- SELECT * FROM students ASC LIMIT 2;
- SELECT * FROM students LIMIT 2;
- SELECT * FROM students ORDER BY name LIMIT 2 ASC;
- SELECT * FROM students ORDER BY name LIMIT 2;
Answer: D) SELECT * FROM students ORDER BY name LIMIT 2;
Explanation:
The correct query is to get the first two names from the 'students' table, ordered alphabetically
Syntax:
SELECT * FROM students ORDER BY name LIMIT 2;