Hi i am trying to creat a table called item with the following code: -Creation of Item Table DROP TABLE ITEM CASCADE CONSTRAINTS; CREATE TABLE ITEM( ITEMID NUMBER (6) NOT NULL, ITEMDESC VARCHAR2 (30) NOT NULL CATEGORY VARCHAR2 (25), ); Code (markup): 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 CATEGORY VARCHAR2 (25), * ERROR at line 4: ORA-00907: missing right parenthesis Code (markup): Ok, when i go to line 4 take into account i have a comment at first line, 'ITEMDESC VARCHAR2 (30) NOT NULL' and add a comma which is now 'ITEMDESC VARCHAR2 (30) NOT NULL,' i get a different error message: SQL> @table.sql DROP TABLE ITEM CASCADE CONSTRAINTS * ERROR at line 1: ORA-00942: table or view does not exist ) * ERROR at line 5: ORA-00904: invalid column name Code (markup): Question, how do i know when to add a comma and not when to add a comma, because i do not understand why i have the first and second error message afte i added the (,)??
drop table if exists `ITEM`; CREATE TABLE `ITEM`( ITEMID NUMBER (6) NOT NULL, ITEMDESC VARCHAR2 (30) NOT NULL, CATEGORY VARCHAR2 (25), ); You missed a comma after ITEMDESC VARCHAR2 (30) NOT NULL
i used your code but i get an error: SQL> @table.sql drop table if exists `ITEM` * ERROR at line 1: ORA-00933: SQL command not properly ended CREATE TABLE `ITEM`( * ERROR at line 1: ORA-00911: invalid character Code (markup): Does any1 know why my code does not work??