ALTER TABLE syntax

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

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

On executing it, I am getting an error as below:

SQL Error: ORA-30649: missing DIRECTORY keyword

I have played around it but it didn't help. What is wrong in the SQL query?

Answers


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

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

Need Your Help

Adding button to QTableview

c++ qt qt4

I have created one table by using QTableview and QAbstractTableModel .

--resource-rules has been deprecated in mac os x >= 10.10

ios iphone code-signing ipa osx-yosemite

I tried to resign my ipa file with new provisioning profile on Mac Os 10.10 with iResign app but I got this warning: "Warning: --resource-rules has been deprecated in Mac OS X >= 10.10".