faizan ahmad

Usually the things which were not a straight Google

  Home  |   Contact  |   Syndication    |   Login
  17 Posts | 0 Stories | 68 Comments | 0 Trackbacks

News

Archives

Post Categories

.NET

ASP.NET

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 :)

posted on Friday, August 7, 2009 11:21 AM

Feedback

# re: Add new column/field in Oracle DB table - ora - 30649: missing Directory 8/20/2009 7:46 AM Edd Grant
This just saved me from a potentially lengthy and painful debugging excercise, many thanks!

# re: Add new column/field in Oracle DB table - ora - 30649: missing Directory 2/11/2010 9:39 AM Manuela
@Edd Grant so true...

For a moment I froze when I saw the error, cause the message is so cryptic. Thank you for the solution!

# re: Add new column/field in Oracle DB table - ora - 30649: missing Directory 7/20/2011 9:56 AM mike
thanks, this helped!

# re: Add new column/field in Oracle DB table - ora - 30649: missing Directory 8/6/2011 9:44 AM Jorge Gutierrez
Gracias por la ayuda, me sirvio de mucho.

# re: Add new column/field in Oracle DB table - ora - 30649: missing Directory 10/11/2011 8:29 AM Krupa
Hey thanks.. it was so simple still wasted my much time.. thanks to u..

# re: Add new column/field in Oracle DB table - ora - 30649: missing Directory 10/21/2011 7:21 AM L Praveen
Thank u very much...saved a lot of my time

# re: Add new column/field in Oracle DB table - ora - 30649: missing Directory 12/26/2011 1:37 AM Geeta Jagan
Thanks much , this helped..

# re: Add new column/field in Oracle DB table - ora - 30649: missing Directory 2/22/2012 6:32 AM gowri
hi,
i have one problem with this query help me,

alter table candidate modify cand_status char(30) default 'not schedule' check(cand_status in('scheduled','visited','not schedule','postpond','pending','rejected'));

when i execute table alter but cand_status column is not show the default values "NOT SCHEDULE" where is my mistake

# re: Add new column/field in Oracle DB table - ora - 30649: missing Directory 7/10/2012 4:43 PM Nate
Thanks man.

Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: