現在資料庫中有需要將多條資料合并,然后其中有一個值時current或者時previous,如果為兩個值都有的話回傳,current,如果只有previous的話那么回傳previous,都不存在的話回傳空:
之前的做法時把查詢出來的值都合并,現在需要修改:
select orbis group_concat(distinct dmcdate separator '$$') from orbis group by bvdnum,dmbnum;
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/26624.html
標籤:MySQL
上一篇:有會資料庫的題嗎
下一篇:問題是這樣的
