-2
我有下面的表结构。 (我是新来的SQL精简版)SQL Lite中的递归查询CTE
create table Relations
(
Code int,
ParentCode int ,
fname text
)
GO
insert into Relations values(1,null,'A');
insert into Relations values(2,null,'B');
insert into Relations values(3,2,'C');
insert into Relations values(4,3,'D');
我想代码的原始母体= 4: 即值2空乙
我无法弄清楚如何编写递归查询以sqllite表示。 在此先感谢..
哪一部分[文件]中(http://www.sqlite.org/lang_with.html)你不明白吗? –