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
 

 

to change not null constraint to null

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    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

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
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 Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts Command UNIQUE CONSTRAINT on any tabl... rohanthengal DB2 2 Thu Aug 18, 2016 3:48 pm
No new posts Converting NULL column into NOT NULL ... Raghu navaikulam DB2 5 Sat Aug 06, 2016 3:45 pm
No new posts How to change dataset attributes of m... ignich7 JCL & VSAM 3 Thu Jul 21, 2016 9:17 pm


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