IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Not null to null in DB2


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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
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,

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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts the system or user abend SF0F R=NULL COBOL Programming 0
No new posts Uploading from desktop, a CSV file, s... DB2 2
No new posts How to handle NULL in COBOL program COBOL Programming 8
No new posts Change NULL indicator in UNLOAD utility DB2 2
Search our Forums:

Back to Top