ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

How to use Sorting (Order By) in Select Statement in SQL Server -SQL Server /TSQL Tutorial Part 109

TSQL Tutorial

Transact SQL

SQL Server Free Training

TSQL Free Training

Database

SQL Server Free Video Tutorial

TSQL Video Free Training

Step by Step SQL Server Tutorial for beginners to advance level

SQL Developer

SQL Interview Questions

Real time Interview Questions for SQL Server Developer or DBA

TechBrothersIT

MSBI

Real time SQL Scripts

Select qury

order by clause sql

SQL 2016

DBA

Developer

Автор: TechBrothersIT

Загружено: 2016-07-18

Просмотров: 8491

Описание: SQL Server / T-SQL Tutorial Scenario:
How to use Sorting ( Order By) in Select Statement in SQL Server - SQL Server / TSQL Tutoria

The Order by Keyword can be used to sort the result set. We can sort the results by single or multiple columns.

Let's create dbo.Customer table with couple of test records and then use Order by keyword to sort them.

1) When we only use Order by ColumnName
Let's say if you would like to sort the data by using Id column and in ascending order, you can use below query.

Notice that in first query, I did not write ASC to order the data in ascending order. In second query I did use ASC key word. If you don't use any keyword after column names, SQL Server will order the data in ascending order.

2) How to sorting data in desending order
To order results in desending order, you have to add DESC keyword after column names. Let's say if we would like to order the data by using FName in desending oder, we will use below query.


3) Using Column Numbers instead of Column Names in Order by
You can always use the Column numbers instead of column names in Order by. Let's say if we would like to order by FName,ID we can write our query by using names or column numbers as shown below.

Link to scripts used in SQL Server / TSQL Tutorial Video
http://www.techbrothersit.com/2016/06...

Check out our website for Different SQL Server, MSBI tutorials and interview questions
such as SQL Server Reporting Services(SSRS) Tutorial
SQL Server Integration Services(SSIS) Tutorial
SQL Server DBA Tutorial
SQL Server / TSQL Tutorial ( Beginner to Advance)
http://www.techbrothersit.com/

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
How to use Sorting (Order By) in Select Statement in SQL Server -SQL Server /TSQL Tutorial Part 109

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]