MySQL☞order by与distinct

asc(升序,默认值)/desc(降序)

 

1、根据某一列的列值进行升序或者降序操作。

select  列名 别名 from 表名 order by 列名 asc/desc

    MySQL☞order by与distinct

 

2、根据多个列值进行排序

select 列名1,列名2,列名3... from 表名 order by 列名1 desc,列名2 asc

 MySQL☞order by与distinct

 

3、抹掉重复数据

select distinct 列名 from 表名

   MySQL☞order by与distinct

 

 

 

 

posted @ 2018-09-25 14:30 大鑫鑫 阅读(...) 评论(...) 编辑 收藏

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-12
  • 2021-08-25
  • 2022-12-23
  • 2021-07-13
  • 2021-12-05
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-25
  • 2022-12-23
  • 2021-11-22
  • 2021-11-18
  • 2021-06-20
相关资源
相似解决方案