Syntax ALTER TABLE - DIRECTORY Keyword Missing

I am trying to modify a table in an Oracle database by adding two new columns with an SQL query to it, as shown below:

ALTER TABLE Members ADD annual_dues NUMBER(5,2) not null DEFAULT '52.50', ADD payment_date DATE; 

When doing this, I get an error message as shown below:

SQL Error: ORA-30649: DIRECTORY Keyword Missing

I played around him, but that didn't help. What is wrong with the SQL query?

+11
source share
2 answers

I think you need to put NOT NULL after DEFAULT 52.50 :

 ALTER TABLE Members ADD ( annual_dues NUMBER(5,2) DEFAULT 52.50 NOT NULL , payment_date DATE ); 
+36
source

this is the correct syntax for your problem

 alter table members add (annual_dues decimal (5,2) default '52.50' not null, payment_date date); 
-one
source

All Articles