A Guide to SQL
A Guide to SQL
9th Edition
ISBN: 9781111527273
Author: Philip J. Pratt
Publisher: Course Technology Ptr
Question
Book Icon
Chapter 5, Problem 11CAT
Program Plan Intro

ORDER BY Clause:

SQL contains “ORDER BY” clause in order to sort rows. The values get sorted in ascending as well as descending order. The keyword used to sort values in ascending order is “ASC” and for descending order is “DESC”. By default, it sorts values by ascending order.

Syntax:

SELECT column_Name1, column_Name2 FROM table_Name ORDER BY column_Name2;

Blurred answer
Students have asked these similar questions
List the trip name, trip id and customer number of all reservations for hiking trips. Sort the results in ascending order by trip id as the major sort key and customer number as the minor sort key
9. Find the total amount of tax paid by resident of NJ Hint: The tax cost stored in tax_amount column in the orders table The state name stored in state column in the addresses table
Find nth number highest salary. Table:- EMPLOYEE Column Name:- Name,Dept_id,salary,On_Year_Exp.
Knowledge Booster
Background pattern image
Similar questions
Recommended textbooks for you
Text book image
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
Text book image
Oracle 12c: SQL
Computer Science
ISBN:9781305251038
Author:Joan Casteel
Publisher:Cengage Learning
Text book image
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage