What is SQL ORDER BY Statement

SQL ORDER BY Statement

In this tutorial we know about the SQL ORDER BY statement, First talking on ORDER BY SQL statement, you must know Introduction to SQL For Beginners and also know what is SQL Syntax. Also know about the SELECT Statement. With SELECT statement get all records from tables but when we want distinct records or value. So we use SQL SELECT DISTINCT statement. SQL stands for Structure query language in Relational Database Management System (RDBMS). SQL Syntax is the format in which data save, update, insert with the SQL commands.

What is ORDER BY Statement?

In Order by statement we used to sort the result data in ascending or descending order.
By default, result set always sort in ascending order. When we need to sort records in descending order by used keyword DESC. A database contain table objects, there are many tables or one table in the database. Tables contains data in the form of records in the format of rows and also contains fields called columns.

ORDER BY Syntax:

SELECT column_name FROM table_name
ORDER BY column_name

In this syntax select statement is using with order by for sort records with respect to column name. Also result set sort in ascending or descending order by DESC keyword.

You Must Read Also:

SQL Introduction For Beginners

How To Insert Records In Database Using C# Language

How to Remove Duplicate Data from Database

What is SELECT DISTINCT Statement

Know What is SQL Syntax

What Is SQL Select Statement

Leave a Comment