Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
to change not null constraint to null

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
Author Message
ugna04@yahoo.com

New User


Joined: 25 Sep 2005
Posts: 3

PostPosted: Mon Oct 03, 2005 5:57 pm    Post subject: to change not null constraint to null
Reply with quote

i have created a table
create table emp(eid varchar(4) not null primary key,ename char(10) not null,age integer,deptid varchar(4) not null) ;
now i want to alter this table to change the not null value of ename to
null ,how would i write the necessary sql statement for it.
please clear my doubt.
Back to top
View user's profile Send private message
References
SWAPNA LATHA

New User


Joined: 13 Jun 2005
Posts: 3

PostPosted: Mon Oct 17, 2005 12:13 pm    Post subject:
Reply with quote

hi,

check this syntax...i dint try this

alter table emp modify ename char(10);
(default is null)

or

alter table emp modify (ename char(10) not null to ename char(10) null);
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1