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: 1214
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 All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts FileAid move data from two files to o... Compuware & Other Tools 5
No new posts Structured Data and Nested Loops via ... COBOL Programming 0
No new posts Alternate key data extracttion COBOL Programming 13
No new posts Multiple INSPECTS on a big size file COBOL Programming 6
No new posts db2 vs static data COBOL Programming 1
Search our Forums:


Back to Top