0

I have a create table statement on a Oracle Script file and when I executed the script file, I am unable to create the table.

Content of script file

-- Table Creation Script

CREATE TABLE SampleTable
(

FIELD1 NUMBER NOT NULL,
FIELD2 DATE NULL,
FIELD3 DATE DEFAULT SYSDATE,
FIELD4 DATE NULL,
FIELD5 NUMBER(10) DEFAULT 1,
FIELD5 NUMBER(10) NULL,
FIELD6 VARCHAR2(1000) NULL
);

I am getting a SP2-0734: error. Any ideas?

2 Answers 2

3

Two things:

One - remove that carriage return between ( and FIELD1

Two - there are two FIELD5 entries, giving the result ORA-00957: duplicate column name

Here:

CREATE TABLE SampleTable
(
FIELD1 NUMBER NOT NULL,
FIELD2 DATE NULL,
FIELD3 DATE DEFAULT SYSDATE,
FIELD4 DATE NULL,
FIELD5 NUMBER(10) DEFAULT 1,
FIELD6 NUMBER(10) NULL,
FIELD7 VARCHAR2(1000) NULL
);
Sign up to request clarification or add additional context in comments.

1 Comment

The carriage return was the problem. I mistyped the question with two field5. Thanks for pointing it out.
0

The following link has several promising answers that may resolve your problem.

http://arjudba.blogspot.com/2010/01/sp2-0734-unknown-command-beginning-rest.html

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.