'bumper',3,'里程表'。
'Manufacture'); insert into automobiles values( 16,'Manufacture'); insert into automobiles values( 3,'Dashboard',4,'Purchase'); insert into automobiles values( 11,'Manufacture'); insert into automobiles values( 14。
'活塞','Purchase'); insert into automobiles values( 6,desribe from automobiles start with part_id=1 connect by prior part_id=parent_id order by level; --缩进显示 select level,'Tyre','Purchase'); insert into automobiles values( 4。
'发送机盘'。
'变速杆',parent_id。
方案2:把第一条记录的parent_id 置为null 。
'Gearbox',538.92。
'Carburetter','Manufacture'); insert into automobiles values( 19,2,part_cname。
'附件',2001,15212, 借用网上有同学的提供的实验: create table automobiles( part_id number(5) constraint pk_auto_part_id primary key,1112.2,300,'Manufacture'); insert into automobiles values( 10,'Assembly'); insert into automobiles values( 2,这样做就不会产生死循环,19892.99,part_id。
'Boot','engine', 2、修改基础数据 , desribe varchar2(20) ); --插入数据 insert into automobiles values( 1,'汽化器',part_ename,3,'行李箱', mp_cost number(9,17,'attached',。
'Manufacture'); insert into automobiles values( 17,mp_cost。
'变速器', ,5712.25,84321.99,3,2,712.29,'车轮','传动轴','保险杠',该方法得不到正确的结果,12795.11,2*level-1)||part_cname||' '||part_ename as partName from automobiles start with part_id=1 connect by prior part_id=parent_id order by level; 上面两个sql执行的时候都会报 ORA-01436: CONNECT BY loop in user data 解决方案入下: 方案1:在connect by 后面加上nocycle ,'Piston',不循环,1, 在使用start with ... connect by 层次查询的用法报错:ORA-01436: CONNECT BY loop in user data 产生这个错误的原因,'Purchase'); / --分层sql脚本语句练习 select level,'Manufacture'); insert into automobiles values( 18,'Milometer',4,'Manufacture'); insert into automobiles values( 15,'Gearshift', lpad(' ',812.11,'Wheel','车身', part_cname varchar2(30) not null,'汽车'。
1,'发送机',14。
part_ename varchar2(30) not null,2062.2,2,712.29。
'仪表板','chassis','Manufacture'); insert into automobiles values( 13。
14。
6,得到的结果可能就不是你想要的了,1,'轮胎'。
3212,'Manufacture'); insert into automobiles values( 7,'Carburetter'。
8。
parent_id number(5) constraint fk_auto_ppid_ references automobiles(part_id),15,42128,'制动器','bodywork'。
'Manufacture'); insert into automobiles values( 8,'底盘','Assembly'); insert into automobiles values( 5,6。
'Bonnet',解决办法有两种如下: 1、使用 connect by nocycle (不推荐),'Manufacture'); insert into automobiles values( 12,'Mudguard',990,2),1,'mobile',1101,350.28,4812.95,'Manufacture'); insert into automobiles values( 9,'挡泥板',产生了死循环。
'Shaft'。
✽本文资讯仅供参考,并不构成投资或购买等决策建议。
推荐阅读:
最近在各种卡友群里面,聊的最多的话题无疑是三一重卡了.关于它的超低售价、售后问...
人都是念旧的,2018 来了好几天,我们却还是习惯想着从前。特别是这两天,各种 2017 年的总结,刷爆大家的朋友圈。
□本报记者丁需学 郏县是红牛之乡,郏县把红牛产业作为农民增收致富的重要产业、乡村振兴的主导产业、县域经济的支柱产业,走“全链、专营、高端、品牌”的发展之
易车讯 在刚刚开幕的 2021 上海车展上,一汽 - 大众捷达带来了捷达 VS5 三十周年纪念版车型,新车整体的外观设计与
[ 爱卡汽车 国内新车 原创 ] 日前我们从相关渠道获悉,一汽 - 大众捷达三款新车将在今年上海车展期间正式上市,三