zhiqingstudy

Be a young person with knowledge and content

Sort syntax: SELECT * FROM ` table name ` ORDER BY ` column 1 ` ASC | DESC [, column 2 ASC | DESC,...];

Syntax description:

1. Sort by column 1 first. If column 1 has the same value, sort by column 2, and so on.

2. ASCs are arranged from small to large, that is, in ascending order.

3. DESC is sorted from large to small, that is, descending.

4. By default, the column values are arranged from small to large (that is, ASC keyword)

Example: Query all student information, sort by age, and sort by height for the same age:

SELECT * FROM `ceshi1` ORDER BY `age` ASC , `height` DESC ;

comment
head sculpture
Code:
Related

Why you shouldn't stay at a job for more than 2 years?

3 harsh facts long-distance relationships

how to keep your girlfriend interested in a long-distance relationship




Unless otherwise specified, all content on this website is original. If the reprinted content infringes on your rights, please contact the administrator to delete it
Contact Email:2380712278@qq.com

Filing number:皖ICP备19012824号