Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with this Create Table Code

Status
Not open for further replies.

witchblade

Programmer
Aug 1, 2001
50
US
Can someone please take a look at my code below? I've created many tables, but I keep getting errors. My code and the errors are below.

DROP TABLE PRODUCTS;
CREATE TABLE PRODUCTS
(TITLE VARCHAR2(50)
AUTHOR VARCHAR2(50),
ISBN CHAR(15) PRIMARY KEY,
COST NUMBER(7,2),
QUANTITYONHAND TEXT(10));

DROP TABLE PRODUCTS
*
ERROR at line 1:
ORA-00942: table or view does not exist


(TITLE VARCHAR2(50)
*
ERROR at line 2:
ORA-00922: missing or invalid option
 
First error is not a problem since table is not created you cann't drop it.
In the create script u were missing a comma and datatype 'TEXT' is not valid. It should like this.

CREATE TABLE PRODUCTS
(TITLE VARCHAR2(50),
AUTHOR VARCHAR2(50),
ISBN CHAR(15) PRIMARY KEY,
COST NUMBER(7,2),
QUANTITYONHAND NUMBER(10));


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top