根据code 分组然后取出每组中的任意一行
SELECT *from( SELECT *, row_number () OVER ( partition BY code ORDER BY code DESC ) rowid FROM dept ) t WHERE rowid = 1;
SQL中相关子查询
https://www.cnblogs.com/xcyjblog/p/14841168.html
https://www.cnblogs.com/chenmh/p/3998614.html
https://www.cnblogs.com/mazey/p/6517744.html
标签:常用,code,cnblogs,www,手册,html,https,sql,com From: https://www.cnblogs.com/flangrean/p/17470217.html