Solved

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

Posted on 2004-08-11
5
507 Views
Last Modified: 2008-03-17
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
Comment
Question by:amitra123
5 Comments
 
LVL 13

Accepted Solution

by:
ghp7000 earned 125 total points
ID: 11788959
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
 
LVL 50

Expert Comment

by:Lowfatspread
ID: 11796360
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recursive SQL in UDB/LUW (you can use 'recursive' and 'SQL' in the same sentence) A growing number of database queries lend themselves to recursive solutions.  It's not always easy to spot when recursion is called for, especially for people una…
Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question