0
votes

I am using oracle 10g to create a database with STUDENT as table. now i am inserting data into STUDENT table with following code.

I have used following query to create table STUDENT

create table STUDENT ( Student_id number(6) primary key,Name varchar(20),Last_name varchar(20), Ssn number(10), Phone varchar(15),Address varchar(25));

for insert data, I am using following code.

INSERT ALL
INTO STUDENT values(1001,'Clarence','Edmond',920644345,'419-942-7436','Wabash,OH')
INTO STUDENT values(1002,'James','Dill',861623976,'203-339-0467','Bridgeport,CT')
SELECT * FROM DUAL;     

But while Running, I am getting error : ORA-00911: invalid character

Can anyone provide a solution ?

1
What is the perfect for using INSERT ALL?. You just execute like that INSERT INTO STUDENT values(1001,'Clarence','Edmond',920644345,'419-942-7436','Wabash,OH'); INSERT INTO STUDENT values(1002,'James','Dill',861623976,'203-339-0467','Bridgeport,CT');. Please put ';' in end of the query statement. - Jar Yit
Edited insert all query works and no error. - Ozan

1 Answers

0
votes

the code worked for me. try typing it out instead of copying it. This error may occur if you've pasted your SQL into your editor from another program. Sometimes there are non-printable characters that may be present. In this case, you should try retyping your SQL statement and then re-execute it.