KnowledgeBoat Logo
|

Informatics Practices

What is the significance of "ORDER BY" in the given query?

SELECT emp_id, fname, lname
FROM person
ORDER BY emp_id;

(a) Data of table person on the basis of column emp_id will be sorted in descending order

(b) Data of table person on the basis of column emp_id will be sorted in ascending order

(c) Only data of column emp_id will be sorted in descending order

(d) Only data of column emp_id will be sorted in ascending order

SQL Queries

1 Like

Answer

Data of table person on the basis of column emp_id will be sorted in ascending order

Reason — The significance of the ORDER BY clause in the given query is to sort the result set based on the values in the emp_id column in ascending order by default.

Answered By

2 Likes


Related Questions