To sort the result set in ascending or descending order, use the ORDER BY keyword. By default, the ORDER BY keyword organises the records in ascending order. Use the DESC keyword to sort the records in descending order.
The ORDER BY clause is used to arrange entries in ascending or descending order on one or more columns. If the query contains them, the ORDER BY clause must occur after the WHERE, GROUP BY, and HAVING clauses.
A SQL SELECT query with the ORDER BY clause returns a result set with the rows sorted by the values of one or more columns.
SELECT name, credit limit FROM customers ORDER BY 2 DESC, 1; The name column is positioned 1 while the credit limit column is positioned 2. These column positions were utilised in the ORDER BY clause to tell Oracle to sort the data.
The WHERE clause can be used with or without the ORDER BY declaration.
Learner's Ratings
4.3
Overall Rating
70%
11%
7%
0%
12%
Reviews
A
Ankush Raj
5
good
R
ruhina qureshi
5
Awesome Classes ,Both tutors explains the concept very nice
Y
Yadav Aakash
5
very useful thank you learnvern
A
Ashish
5
The course is very good. I have stuck at a point that how you create multiple rows with a single insert in sales.customer table. I get only one customer data. this table is related to bikestore data.
Share a personalized message with your friends.