Advertisement

Latest Post

Sunday, 18 September 2016

How to use ASC keyword in Sql

The ASC keyword is used to sort the record in ascending order. This keyword is used with the ORDER BY expression 
Syntax:
SELECT column1, column2.... FROM your_table_name ORDER BY column_name ASC;
Example:
Id
Name
Age
Address
1
Alok Kumar Singh
30
IN
2
Tomas Paul
45
NZ
3
Cristomfer Dee
85
AU
4
Niel Macengi
55
US




USE SQLCLR
GO
SELECT * FROM EMPLOYEE ORDER BY Name ASC

GO

Id
Name
Age
Address
Department
Gender
1
Alok Kumar Singh
30
IN
IT
Male
3
Cristomfer Dee
85
AU
HR
Female
4
Niel Macengi
55
US
BPO
Female
2
Tomas Paul
45
NZ
IT
Male



Government Jobs