2

我有以下查询用于将值插入到我的导师表中:

INSERT INTO Tutor ( tutor_ID NUMBER(3), 
                    F_name VARCHAR(14), 
                    L_name VARCHAR(13), 
                    Date_Joined DATE, 
                    Phone NUMBER(10), 
                    Email VARCHAR(30),
                    amount_of_allowance VARCHAR(5), 
                    tutoree_ID NUMBER(6)
                  ) VALUES
                  ( 610, 
                    'DAVID', 
                    'FOONG', 
                    '02/07/2007', 
                    02104465, 
                    'DAVIDFOONG@YAHOO.COM', 
                    '800', 
                    007);     

运行后它写道

"Error starting at line 28 in command:
INSERT INTO Tutor (tutor_ID NUMBER(3), F_name VARCHAR(14), L_name VARCHAR(13), Date_Joined DATE, Phone NUMBER(10), Email VARCHAR(30), amount_of_allowance VARCHAR(5), tutoree_ID NUMBER(6))
VALUES  (610, 'DAVID', 'FOONG', '02/07/2007', 02104465, 'DAVIDFOONG@YAHOO.COM', '800', 007)

Error at Command Line:28 Column:28
Error report:
SQL Error: ORA-00917: missing comma
00917. 00000 -  "missing comma"
*Cause:    
*Action:"

但我不明白我在哪里错过了逗号?

4

1 回答 1

6

您不应在插入语句中包含数据类型定义:

insert into Tutor
(tutor_ID, F_name, L_name, Date_Joined, Phone, Email, amount_of_allowance, tutoree_ID)
values 
(610, 'DAVID', 'FOONG', '02/07/2007', 02104465, 'DAVIDFOONG@YAHOO.COM', '800', 007);    
于 2012-06-02T00:34:02.253 回答