我删除了中间的引号以进行测试。但我仍然得到同样的错误。请你看看这个。
insert all
2 into bills(Name,Amount,Accoun_Id) values('Power Company',75,1)
3 into bills(Name,Amount,Accoun_Id) values('Record Club',25,2)
4 into bills(Name,Amount,Accoun_Id) values('Software Company',250,1)
5 into bills(Name,Amount,Accoun_Id) values('Cable TV company',35,3)
6 into bills(Name,Amount,Accoun_Id) values('Joe car palace',350,5)
7 select * from dual;
2 into bills(Name,Amount,Accoun_Id) values('Power Company',75,1)
*
ERROR at line 2:
ORA-00905: missing keyword
全长查询如下:
insert all
2 into bills(Name,Amount,Accoun_Id) values('Power Company',75,1)
3 into bills(Name,Amount,Accoun_Id) values('Record Club',25,2)
4 into bills(Name,Amount,Accoun_Id) values('Software Company',250,1)
5 into bills(Name,Amount,Accoun_Id) values('Cable TV company',35,3)
6 into bills(Name,Amount,Accoun_Id) values('Joe car palace',350,5)
7 into bills(Name,Amount,Accoun_Id) values('S.C.Student Loan',200,6)
8 into bills(Name,Amount,Accoun_Id) values('Florida Water Company',20,1)
9 into bills(Name,Amount,Accoun_Id) values('U-O-Us Insurance Company',125,5)
10 into bills(Name,Amount,Accoun_Id) values('Debtors Credit Card',35,4)
11 select * from dual;
ERROR:
ORA-01756: quoted string not properly terminated
任何人都可以帮我解决这个问题。
insert all
2 into bills(Name,Amount,Accoun_Id) values('Phone Company',125,1)
3 into bills(Name,Amount,Accoun_Id) values('Power Company',75,1)
4 into bills(Name,Amount,Accoun_Id) values('Record Club',25,2)
5 into bills(Name,Amount,Accoun_Id) values('Software Company',250,1)
6 into bills(Name,Amount,Accoun_Id) values('Cable TV Company',35,3)
7 into bills(Name,Amount,Accoun_Id) values('Joe''s Car Palace',350,5)
8 into bills(Name,Amount,Accoun_Id) values('S.C.Student Loan',200,6)
9 into bills(Name,Amount,Accoun_Id) values('Florida Water Company',20,1)
10 into bills(Name,Amount,Accoun_Id) values('U-O-Us Insurance Company',125,5)
11 into bills(Name,Amount,Accoun_Id) values('Debtor''s Credit Card',35,4)
12 select * from dual;
ERROR:
ORA-01756: quoted string not properly terminated
答案 0 :(得分:2)
在第6行中,字符串文字由值中的单引号提前终止。
6 into bills(Name,Amount,Accoun_Id) values('Joe's car palace',350,5)
您可以使用另一个单引号转义单引号:Joe''s car palace
。第10行也会出现同样的问题。