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

to change not null constraint to null


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ugna04@yahoo.com

New User


Joined: 25 Sep 2005
Posts: 3

PostPosted: Mon Oct 03, 2005 5:57 pm
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
SWAPNA LATHA

New User


Joined: 13 Jun 2005
Posts: 3

PostPosted: Mon Oct 17, 2005 12:13 pm
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
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 3270 personal communications. Can't c... TSO/ISPF 2
No new posts SELECT from data change table DB2 5
No new posts Trying to change copybook in online c... CICS 4
No new posts Change Default Scroll Setting TSO/ISPF 1
Search our Forums:

Back to Top