#2
zb4275052013-01-28 09:06
|
将原有的Oracle语句转化成普通的SQL来执行。sqlite中没有connect by prior start with语句,请问我该怎么改?
select u.user_id, u.truename, u.name from user u,
(select t.group_id, t.group_name, t.group_parent from user_group t
connect by prior t.group_id=t.group_parent start with t.group_parent=(select group_id
from user where user_id=2 and rownum<=1)) t
where t.group_id=u.group_id and u.state<>3
求高手指教!