1. 程式人生 > >oracle 中start with 的用法

oracle 中start with 的用法

oracle 提供了start wit h c onnect by 語法結構可以實現遞迴查詢。

1. 一個簡單舉例:
SQL> select *   from test;

BILL_MONTH                     DAY_NUMBER MSISDN
-------------------- ---------- --------------------
200803   
                                           1 13800
200803                             
                 3 13800
200803                                               2 13800
200803   
                                           2 13801
200803                                               4 13804
200803                                               5 13804
200803                                               7 13804
200803                                               8 13804
200803                                               6 13802
200803                                               6 13801
200803