| vuong |
Posted: Jan 13, 2007 06:10:31 PM |
Total Post: 7
Joined: Jan, 2007
|
I am trying to creat a table called 'ITEM' wit the following code:
-- Creation of Item Table
DROP TABLE ITEM CASCADE CONSTRAINTS;
CREATE TABLE ITEM(
ITEMID NUMBER (6) NOT NULL,
);
but 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
Input truncated to 2 characters
unknown command ")" - rest of line ignored.
Does any1 know y? |
|
|
Vigyan |
| Posted: Jan 13, 2007 06:30:15 PM | |
|
Total Post: 386
Joined: May, 2001
|
Try.
CREATE TABLE ITEM( ITEMID NUMBER(6) NOT NULL );
|
|
|
|
|
vuong |
| Posted: Jan 13, 2007 06:43:12 PM | |
|
Total Post: 7
Joined: Jan, 2007
|
Thank you that works, but does that mean that when create a table, i can only do this on 1 line?
What if i want to add another attribute:
For example:
ITEMDESC VARCHAR (6) NOT NULL,
Must the above code b on the same line as the first?
|
|
|
|
|
Vigyan |
| Posted: Jan 14, 2007 06:35:05 PM | |
|
Total Post: 386
Joined: May, 2001
|
No. it is not necessary to have code in one line. This was a syntax problem.
Removing comma has solved the problem.
Thanks,
Vigyan
|
|
|
|
|
| Time Zone: EDT |
Send this thread to your friend |