Home Sql Mysql-example MySQL Ascending Command



MySQL Ascending Command
Posted on: February 4, 2009 at 12:00 AM
MySQL Ascending is used to return the records from a table in the ascending order.

MySQL Ascending Command

     

MySQL Ascending is used to return the records from a table in the ascending order. The section will provides you the mean for arranging the data of database table in ascending order. The ascending order sorts the records from the smallest to largest number in sequence like 10,15,25,30...

Understand with Example

The Tutorial illustrate an example from 'MySQL Ascending Command'. To understand the example we execute SELECT ASCII (name), name FROM emp order by name that sort the data of the 'emp' table in ascending order. The ORDER BY clause is used to sort the records on the basis of name.

List of Syntax:

ASC clause: This is used to arrange data in ascending order.

ORDER BY: This is used to sort the records in the specific columns of a table.

 

Query

 

" valign="top">
SELECT ASCII(name), name FROM emp order by name;

 

Output

 

+-------------+---------------------+
| ASCII(name) | name                |
+-------------+---------------------+
| 97          | amardeep patel      |
| 97          | amit raghuvanshi    |
| 97          | anusmita            |
| 100         | deepak mohanty      |
| 103         | girish tewari       |
| 103         | govind              |
| 104         | hardeep             |
| 107         | komal choudhary     |
| 110         | noor                |
| 114         | rakesh              |
| 114         | ravikant sachan     |
| 115         | sandeep kumar suman |
| 115         | santosh kashyap     |
| 115         | saurabh             |
| 115         | suman saurabh       |
| 118         | vikash              |
| 118         | vineet bansal       |
| 118         | vinod kumar         |
+-------------+---------------------+

 

Related Tags for MySQL Ascending Command:
sqlmysqlcdatabaseidetabledataiosortsedordervinumberreturnsequenceidtablikelargeforrecordrecordstobaseeildessectionliusefromceinasmessmallendaseallmemeanprosurnsoginatmykislleaascendingarrdsrtrtssceseqssrdthstabablargeseqendingprndonomo


More Tutorials from this section

Ask Questions?    Discuss: MySQL Ascending Command  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.