Home » RDBMS Server » Enterprise Manager » Removing Default Value
Removing Default Value [message #67936] Fri, 19 July 2002 11:56 Go to next message
Isaac
Messages: 5
Registered: March 2001
Junior Member
If you've got a table with default values for some fields, and you want to remove the default values, what do you do? Simply deleting the value in the "Default Value" column in the table properties section of the OEM generates a SQL string like:

ALTER TABLE "TABLENAME" MODIFY("FIELDNAME" DEFAULT )

which generates an error because the sowtware is expecting a value after "DEFAULT".

Thanks,
Isaac
Re: Removing Default Value [message #67938 is a reply to message #67936] Fri, 19 July 2002 15:50 Go to previous message
ctg
Messages: 146
Registered: July 2002
Senior Member
ALTER TABLE tablename
MODIFY columnname DEFAULT NULL;

By default, every columns default is NULL.
Previous Topic: Schema backup
Next Topic: Export - dbsnmp.exe initialization failed
Goto Forum:
  


Current Time: Fri Apr 19 21:41:56 CDT 2024