Blake Wilson
Blake Wilson

Reputation: 21

ORA-00936: missing expression error when I'm trying to create a new table

An error is shown when I'm trying to create a new table:

 Error starting at line : 1 in command -
    CREATE TABLE users_test1
    (
        user_id         NUMBER          NOT NULL        UNIQUE,
        email_address   VARCHAR2(20)    DEFAULT,
        first_name      VARCHAR2(10)    DEFAULT,
        last_name       VARCHAR2(10)    DEFAULT,   
        CONSTRAINT      users_pk PRIMARY KEY (user_id)        
    )
    Error report -
    ORA-00936: missing expression
    00936. 00000 -  "missing expression"
    *Cause:    
    *Action:

Upvotes: 1

Views: 678

Answers (1)

Cyrille MODIANO
Cyrille MODIANO

Reputation: 2376

You are missing the default values. If you specify DEFAULT you have to specify the default value.

Upvotes: 4

Related Questions