对于将值插入到我的客户表中,我有以下查询:

INSERT INTO customer(Booking_id,First_name,Last_name,Phone,Address,Town,Postcode,email)
VAlUES
(1,'Elroy','Craddock',01497 3139773','36 Yaffingale Gate','Tadley','RG78 2AB','[email protected]')

运行后写
Error starting at line 1,551 in command:
INSERT INTO customer (Booking_id, First_name, Last_name, Phone,  Address, Town, Post code, email) VALUES(   1551    ,'  Leonard ',' Babbs   ',  01959 8159688   ,'  46 Zoophagy Green   ',' Choppington ',' NE41 5DB    ',' [email protected] ')
Error at Command Line:1,551 Column:86
Error report:
SQL Error: ORA-00917: missing comma
00917. 00000 -  "missing comma"
*Cause:
*Action:

我已经将近一天的时间试图修复此语法错误!任何帮助/建议表示赞赏!谢谢

最佳答案

这是您的查询:

INSERT INTO customer (Booking_id, First_name, Last_name, Phone,  Address, Town, Post code, email) VALUES(   1551    ,'  Leonard ',' Babbs   ',  01959 8159688   ,'  46 Zoophagy Green   ',' Choppington ',' NE41 5DB    ',' [email protected] ')

您的问题在这里:01959 8159688。这是无效的数字文字。

根据Phone列的类型,必须为:'01959 8159688'(如果是文本列)或01959.8159688(如果是数字列)。

关于sql - 需要帮助在SQL Developer中查找语法,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/19813792/

10-16 02:46