How To Sort Data In SQL

Опубликовано: 22 Февраль 2023
на канале: Analytics School
105
6

In this session of , we will discuss how to sort data in SQL. The ORDER BY clause is used to sort the data in ascending or descending order, based on one or more columns. Most databases sort query results in ascending order by default.

ORDER BY does not change data as it is stored in the table. Data in a table remains unchanged as a result of the ORDER BY clause.

ORDER BY is only used in SELECT contrary to the WHERE clause which can also be used in UPDATE and DELETE clause.

Chapters:

00:00 - Introduction
00:13 - Order By Clause In SQL
00:50 - Demo In PostgreSQL