Mysql中DESC的兩種用法
1、查詢表結(jié)構(gòu)
語法:
desc table_name;
PS:此處desc是describe的縮寫,用法: desc 表名/查詢語句
2、降序
語法:select * from 表 order by 字段 desc
select ename,sal from emp order by sal desc;
手動指定按照薪水由大到小排序(降序關(guān)鍵字desc)文章來源:http://www.zghlxwxcb.cn/news/detail-542943.html
select ename,sal from emp order by sal asc;
手動指定按照薪水由小到大排序(升序關(guān)鍵字 asc)文章來源地址http://www.zghlxwxcb.cn/news/detail-542943.html
到了這里,關(guān)于mysql中desc的兩種用法---1、查詢表結(jié)構(gòu)和降序的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!