MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

change the size of a column!

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
ashish
Beginner


Joined: 05 Nov 2003
Posts: 1
Topics: 1
Location: bangalore-india

PostPosted: Wed Nov 05, 2003 8:08 am    Post subject: change the size of a column! Reply with quote

Is it possible to change the size of a column in a table


for ex:

i have created a table having 1 column description as char (100)
now i want to make it as description char(200)

bye:)
Back to top
View user's profile Send private message
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Wed Nov 05, 2003 8:17 am    Post subject: Reply with quote

Hi

This is what the manual says:
Quote:
Alters the definition of a column. Only the length attribute of an existing column with a VARCHAR data type can be changed. A column cannot be altered if it is used in a referential constraint or a view or has a field procedure routine. It also cannot be altered if it belongs to a table that has edit or validation routine, is defined with DATA CAPTURE CHANGES, or is a created temporary table.


O.
________
Yamaha Royal Star Tour Deluxe specifications


Last edited by ofer71 on Sat Feb 05, 2011 11:08 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Wed Nov 05, 2003 9:00 am    Post subject: Reply with quote

ashish,

As quoted by ofer you cannot alter a column a fixed column. Here is the link for alter table explained in detail.

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DSNSQH11/5.10?DT=20010718164132

If you really want to alter the table then you can take a back up of the table and drop the table and recreate it with new column definitions and load the table back with backup data.

Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group