Jake asked this 3 months ago

What is the purpose of ENABLE keyword in Create Table SQL

What is the purpose of ENABLE keyword in a CREATE TABLE SQL statement?

When I check the DDL statement of an existing table in my Oracle database this is what I see

CREATE TABLE T_EVENTS 

(

  EVENT_ID NUMBER(5) NOT NULL 

 ,EVENT_TIMESTAMP DATE NOT NULL

, EVENT_CATEGORY VARCHAR2(10) NOT NULL 

, EVENT_TYPE VARCHAR2(10) 

, EVENT_DESC VARCHAR2(200) 

, EVENTNUMBER(3) 

, CONSTRAINT T_EVENTS_PK PRIMARY KEY 

  (

    EVENT_ID 

  , EVENT_TIMESTAMP 

  )

  ENABLE 

);

 

What does the ENABLE keyword mean in this DDL? I tried creating the table without ENABLE keyword and don't see any difference.


mohlal 3 months ago

Enable keyword is to enable the primary key constraint.