SQL
monkey1008611
十四线小程序猿
展开
-
MQSQL 设置查询到的结果某一列为从0开始的递增值
#更新顺序 SET @num=0; UPDATE casedetail SETstatus = (@num:= @num+1) WHERE caseId = 104原创 2022-01-13 14:18:24 · 183 阅读 · 0 评论 -
Oracle 多行合并成一行
wm_concat() 这个函数可以把结果合并成一行用逗号隔开 select wmsys.wm_concat(SF) as TOP3 from ( select SF, sum(ZZTS) as ZTS from DM_YYZZSJTJ_YPZZB group by SF order by ZTS ) where rownum<=3 参考链接:https://www.cnbl...原创 2019-07-25 09:12:09 · 546 阅读 · 0 评论