Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Not null to null in DB2

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
venky5436

New User


Joined: 06 Dec 2005
Posts: 12

PostPosted: Tue May 23, 2006 10:09 am    Post subject: Not null to null in DB2
Reply with quote

Hi,

Can anyone please tell me the best,simple and fastest method to change a table column which has data in it from not null to null in DB2.

I have worked on it by exporting ,dropping recreating and importing. But i feel there is another simple way to do it.

This is on the AIX platform and V8.2.2. Your help will be highly appreciated.

Thanks,
Venky
Back to top
View user's profile Send private message

Gurmeet

New User


Joined: 22 Feb 2006
Posts: 46
Location: Pune

PostPosted: Tue May 23, 2006 5:48 pm    Post subject:
Reply with quote

I am not sure whether this can be achieved using online schema change facilities provided by V8.

Check out the following link, hope it helps,

http://www.dbazine.com/db2/db2-mfarticles/mullins-onlineschema/view?searchterm=v8%20schema
Back to top
View user's profile Send private message
krish_mrt

New User


Joined: 15 Apr 2005
Posts: 12
Location: Chennai

PostPosted: Thu May 25, 2006 1:59 pm    Post subject: Re: Not null to null in DB2
Reply with quote

Hi,
You can try this code...
I've been using this on db2 for iSeries...


Code:
ALTER TABLE <table_name>
   ALTER COLUMN <column_name> DROP NOT NULL


The above code removes the NOT NULL constraint form the specified column.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am
No new posts Converting NULL column into NOT NULL ... Raghu navaikulam DB2 5 Sat Aug 06, 2016 3:45 pm
No new posts GetObjectArrayElement returns NULL Majid Hussain Java & MQSeries 2 Wed Mar 30, 2016 2:59 am
No new posts Query to select Null row on priority RahulG31 DB2 24 Thu Jan 21, 2016 5:45 pm
No new posts Null Indicator value -2 means in Embe... deepak_shrivastava DB2 2 Wed Jan 06, 2016 10:27 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us