MySQL中desc命令的两个用法
作者:互联网
1.desc查看表结构的详细信息
DESC table_name; PS:此处DESC是describe的缩写,用法: DESC 表名/查询语句
2.desc降序排列数据
SELECT department_name,salary FROM departments ORDER BY salary DESC; 手动指定按照薪水由大到小排序(降序关键字DESC) SELECT department_name,salary FROM departments ORDER BY salary ASC; 手动指定按照薪水由小到大排序(升序关键字 ASC) PS:此处DESC是descend的缩写, 用法:SELECT * FROM 表 ORDER BY 字段 DESC
标签:salary,name,用法,MySQL,desc,ORDER,SELECT,DESC 来源: https://www.cnblogs.com/imagine-xw/p/16061935.html