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

Constraint Modification in DB2 Column


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
fundu

New User


Joined: 05 Oct 2005
Posts: 2

PostPosted: Wed Nov 02, 2005 7:40 pm
Reply with quote

I have a column defined as Not null.
can someone tell me what's the sql to be executed to make it not null with default?
Back to top
View user's profile Send private message
tam

New User


Joined: 02 Nov 2005
Posts: 12
Location: zz

PostPosted: Thu Nov 03, 2005 12:24 pm
Reply with quote

I think first you've to drop that column and then add it as not null with default.

ALTER TABLE <table_name>
ADD COLUMN <column_name> <column_type>
NOT NULL WITH DEFAULT
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 Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts How to load to DB2 with column level ... DB2 6
No new posts RC query -Time column CA Products 3
No new posts first column truncated in search result IBM Tools 13
No new posts Split a record with data in a differe... DFSORT/ICETOOL 8
Search our Forums:

Back to Top