Invalid column name problem???

Discussion in 'Databases' started by nvidia, Jan 13, 2007.

  1. #1
    Hi i am trying to create an 'item table' 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,
    );
    
    Code (markup):
    ANd i get get the error message:
    
    SQL> @table.sql
    DROP TABLE ITEM CASCADE CONSTRAINTS
               *
    ERROR at line 1:
    ORA-00942: table or view does not exist
    
    
    ITEMID          NUMBER(6),      NOT NULL
                                    *
    ERROR at line 2:
    ORA-00904: invalid column name
    
    Code (markup):
     
    nvidia, Jan 13, 2007 IP
  2. Lurkinback

    Lurkinback Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    use IF NOT EXISTS

    put that around the drop and you should be fine...I think lol
     
    Lurkinback, Jan 13, 2007 IP