Topic: SQL*Plus and PL/SQL >> missing or invalid option??
|
Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property.
You may review the entire Oracle Certification Program Candidate Agreement online Here.
|
|
|
|
| Title: missing or invalid option?? |
| vuong |
Posted: Jan 14, 2007 08:56:38 AM |
Total Post: 7
Joined: Jan, 2007
|
Hi i am trying to create a table called item with the following code:
DROP TABLE ITEM CASCADE CONSTRAINTS;
CREATE TABLE ITEM(
ITEMID NUMBER(6) NOT NULL
ITEMDESC VARCHAR2(30) NOT NULL,
);
And i get this error message:
SQL> @table.sql
DROP TABLE ITEM CASCADE CONSTRAINTS
*
ERROR at line 1:
ORA-00942: table or view does not exist
CREATE TABLE ITEM(
*
ERROR at line 1:
ORA-00922: missing or invalid option
Can som1 help please.
|
|
|
Jayanta |
| Posted: Jan 14, 2007 04:34:37 PM | |
|
Total Post: 479
Joined: Feb, 2006
|
here is the correct version of ur script:
DROP TABLE ITEM CASCADE CONSTRAINTS;
CREATE TABLE ITEM(
ITEMID NUMBER(6) NOT NULL,
ITEMDESC VARCHAR2(30) NOT NULL
);
at 4th line of ur script u were putting a comma(,)"ITEMDESC VARCHAR2(30) NOT NULL,", which was wrong.
hope this will work
with regards
jayanta
|
|
|
|
|
Jayanta |
| Posted: Jan 14, 2007 04:37:07 PM | |
|
Total Post: 479
Joined: Feb, 2006
|
sorry one thing i forgot to mention that in ur version of script u forgot to place a comma after "ITEMID NUMBER(6) NOT NULL" place a comma after the mentioned line, though i have given u the correct version
with regards
jayanta
|
|
|
|
|
| Time Zone: EDT |
Send this thread to your friend |
|
|
|
|
Forum Rules & Description
Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user
|
| |
Get FREE Magazines
|
Top 10 Forum User
|
| Murtuja Khokhar | 843 |
| Mohammed Taj | 746 |
| positive fanatic | 483 |
| Jayanta Sur | 479 |
| Vigyan Kaushik | 386 |
| Gitesh Trivedi | 322 |
| Gopu Gopi | 272 |
| neeraj sharma | 252 |
| Ramesh Jois | 245 |
| Bishal Khetan | 207 |
|
|