Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (55.6k points)

a. SORT BY

b. ORDER

c. ORDER BY

d. SORT

1 Answer

0 votes
by (119k points)

The correct answer is option B (ORDER BY). ORDER BY keyword is used to sort the result-set and we can sort in either ascending or descending order. Here is the syntax to use ORDER BY keyword in SQL:

SELECT column_list
FROM TableNam
ORDER BY column_list ASC|DESC;

Here is the query if you want to sort the employees according to the salaries in the employee table.

SELECT Employee_name, Salary

FROM Employee

ORDER BY Salary

In case you want to learn SQL, then register for this SQL training course by Intellipaat that provides instructor-led training, certification, and also job assistance.

Related questions

0 votes
4 answers
0 votes
1 answer
0 votes
1 answer
asked Dec 6, 2020 in SQL by Appu (6.1k points)
0 votes
1 answer
0 votes
1 answer
asked Jul 20, 2019 in SQL by Tech4ever (20.3k points)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...