oracle如何解決背包演算法?
舉例如下,test表中list欄位有不固定行數字,現在給一個特定的數,找出所有可能行的組合,每行最多出現一次,比如
list
1
2
3
4
5
6
7
8
現在給出的特定值為8,可以的組合有:1,2,5;1,3,4;2,6;3,5;8
特定值作為入參,輸出組合
uj5u.com熱心網友回復:
with t as (select level m from dual connect by level<=8)
select substr(sys_connect_by_path(m,','),2) from t connect by nocycle piror m<m;
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/6870.html
標籤:開發
上一篇:最近24小時排序
