• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 526
  • Last Modified:

Dropping not null constraint in db2 udb/WIn nt/unix

I have a table d ( f float not null). Is there any way I can drop the not null constraint from the table.
Thanks in advance.
Mitra
0
amitra123
Asked:
amitra123
1 Solution
 
ghp7000Commented:
if this column is part of the primary key, you can drop the primary key and re create a new one.
if this column is not part of the primary key but you want to make it nullable, export the data from the table, re create the table as required, re load the data.
0
 
LowfatspreadCommented:
unfortunately the NULL/NOT NULL is a Column Option not a constraint from DB2/UDBs view on SQL

so you basicallt have to export and drop/recreate the table to change this...

 
0

Featured Post

Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now