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

Modifying the data size in Db2


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

New User


Joined: 25 Feb 2005
Posts: 2
Location: bangalore

PostPosted: Fri Mar 11, 2005 11:49 pm
Reply with quote

hi,
Iam Giridhar here is my doubt plz answer to this question and thanksa in Advance.

Q.Can we change the Data size in Db2.if we can how ew can change.Is it possible using ALTER Command?
Ex: in Table empName char(20) but ii is necessary to make is char(30),how?
Back to top
View user's profile Send private message
mcmillan

Site Admin


Joined: 18 May 2003
Posts: 1210
Location: India

PostPosted: Sat Mar 12, 2005 1:37 am
Reply with quote

Quote:
Can we change the Data size in Db2


Yes, We can change the Data Type / Size of the column after DB2 8.0. before that it's possible to change the size of the column if it's declared as VARCHAR.

Quote:
if we can how ew can change


Using ALTER TABLE... ALTER COLUMN statement

Quote:
Table empName char(20) but ii is necessary to make is char(30),how?


ALTER TABLE EMP ATLER COLUMN EMPNAME SET DATA TYPE CHAR(30)
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 Store the data for fixed length COBOL Programming 1
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top