Reputation: 23
I have the following query for inserting values into my tutor table:
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,
'[email protected]',
'800',
007);
after running it writes
"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, '[email protected]', '800', 007)
Error at Command Line:28 Column:28
Error report:
SQL Error: ORA-00917: missing comma
00917. 00000 - "missing comma"
*Cause:
*Action:"
But I don't understand where I missed a comma?
Upvotes: 2
Views: 1945
Reputation: 300549
You should not include datatype definitions in your insert statements:
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, '[email protected]', '800', 007);
Upvotes: 6