select index_id parent_id index_name from t_pub_index start with index_id=0 connect by prior index_id=parent_id 其中start with 和connect by 是Oracle的SQL语句的保留字,使一条记录的parent_id列的值等于前一记录的index_id列的值,并以parent_id等于0的记录开始。SQL中没有类似函数,需要自己编写了。
nvl-->isnull substr--> substring to_char(order_id)--> cast(order_id as varchar(10)) start with connect 不知道错了不管哈,哈哈,哈哈哈......
如果是树形数据处理方法,参考上面的方法.主要是不知道你那个start with connect实现什么功能
substr : substring
parent_id
index_name from t_pub_index
start with index_id=0 connect by prior index_id=parent_id 其中start with 和connect by 是Oracle的SQL语句的保留字,使一条记录的parent_id列的值等于前一记录的index_id列的值,并以parent_id等于0的记录开始。SQL中没有类似函数,需要自己编写了。
substr--> substring
to_char(order_id)--> cast(order_id as varchar(10))
start with connect 不知道错了不管哈,哈哈,哈哈哈......