![](/img/trans.png)
[英]Oracle SQL: Select Distinct combination of two columns among other columns
[英]Oracle SQL Sort two Columns values connected to each other
我的表如下
CC1 CC2
675 876
123 987
453 123
876 453
987 432
想要的結果
CC1 CC2
675 876
876 453
453 123
123 987
987 432
sql分層查詢
SELECT employee_id, last_name, manager_id
FROM employees
CONNECT BY PRIOR employee_id = manager_id;
參考https://docs.oracle.com/database/121/SQLRF/queries003.htm#SQLRF52335
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.