Blog Stats
  • Posts - 14
  • Articles - 0
  • Comments - 14
  • Trackbacks - 0

 

Add new column/field in Oracle DB table - ora - 30649: missing Directory

I was trying to add a new field in an Oracle DB table using this script:

alter table TABLENAME add FIELDNAME char(1) not null default '0'  ;

it was throwing an error:

'ORA-30649:missing directory keyword'

it drove me nutts for a while and after some googling, I was able to figure it out, its the Order: 'not null' should come after default value. right script is:

alter table TABLENAME add FIELDNAME char(1)  default '0'  not null;

 

order does matter :)


Feedback

# re: Add new column/field in Oracle DB table - ora - 30649: missing Directory

Gravatar This just saved me from a potentially lengthy and painful debugging excercise, many thanks! 8/20/2009 7:46 AM | Edd Grant

Post a comment





 

 

 

 

Copyright © faizanahmad