1、查询表某个列重复的数据量:例如:找出重复的学号(XH)的信息 SELECT a.id, a.XH, a.XZBH, a.BYF, COUNT(1) AS c FROM `t_sdrs_xsxj` AS a GROUP BY XH HAVING c > 1; 2、查询表某个列去重后的数据集: 例如 Read More
posted @ 2020-01-09 18:28 Yuezc Views(268) Comments(0) Diggs(0)
一、有三种方式 1、常用的 ORDER BY :默认顺序是从小到大(ASC)或DESC倒序。 例如: SELECT contactLastname, contactFirstname FROM customers ORDER BY contactLastname DESC, //倒序 contact Read More
posted @ 2020-01-09 17:25 Yuezc Views(625) Comments(0) Diggs(0)