SQL Coding For Beginners: A Smart Guide For Absolute Beginners To Learn SQL Database And Server. Learn It Faster And Remember It Longer by Base Leonard

SQL Coding For Beginners: A Smart Guide For Absolute Beginners To Learn SQL Database And Server. Learn It Faster And Remember It Longer by Base Leonard

Author:Base, Leonard [Base, Leonard]
Language: eng
Format: epub
Published: 2020-02-01T16:00:00+00:00


Now, if you wanted to view the last name in descending order, you will use the syntax below:

"SELECT

contact Last name,

contact First name

FROM

customers

ORDER BY

contact Last name DESC;"

The descending “result set” is shown in the picture below:

Or, if you would like to arrange the “last name” in descending order and the “first name” in the ascending order, you can utilize the “DESC” and “ASC” clause in the same query but with the relevant column as shown in the syntax below:

"SELECT

contact Last name,

contact First name

FRO M

customers

ORDER BY

contact Last name DESC,

contact First name ASC;"

The “result set” is shown in the picture below, where the “ORDER BY” clause will first sort the “last name” in descending order and then subsequently sort the “first name” in the ascending order:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.