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
 

 

DB2--can the size of the colume be changed..

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
ursprasanna
Warnings : 2

New User


Joined: 15 May 2006
Posts: 20
Location: chennai

PostPosted: Wed May 17, 2006 5:26 pm    Post subject: DB2--can the size of the colume be changed..
Reply with quote

I would like to know whether the size of the column be changed . if so how that can be achieved .

if not atleast the character type can be changed or not.

Thanks,
Prasanna Subramaniam.
Back to top
View user's profile Send private message

priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Sat May 20, 2006 9:17 am    Post subject: Re: DB2--can the size of the colume be changed..
Reply with quote

I think its NO... you may want to create a new table with updated structure and copy as per need.
Back to top
View user's profile Send private message
sachina2z

New User


Joined: 03 May 2006
Posts: 8
Location: Pune, India

PostPosted: Sat May 20, 2006 12:13 pm    Post subject:
Reply with quote

I hope the following command will solve your problem.

ALTER TABLE table_name
MODIFY column_name column_type;

For example:

ALTER TABLE supplier
MODIFY student_name varchar2(50) not null;


It will modify the column called student_name to be a data type of varchar2(50) and force the column to not allow null values.


Reply me if it works.
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Sun May 21, 2006 4:51 am    Post subject: Re: DB2--can the size of the colume be changed..
Reply with quote

Prasanna,

What is your column data type and what version of DB2 u r using.

you want to increase the length or decrease ?
Back to top
View user's profile Send private message
ursprasanna
Warnings : 2

New User


Joined: 15 May 2006
Posts: 20
Location: chennai

PostPosted: Mon May 22, 2006 10:50 am    Post subject:
Reply with quote

Priyesh,

The column data type is character and i am not clear about the version of DB2 which i am using.

The date base is going for an expansion so the the length of the data type has to be increased.

Thanks,
Prasanna Subramaniam.
Back to top
View user's profile Send private message
Gurmeet

New User


Joined: 22 Feb 2006
Posts: 46
Location: Pune

PostPosted: Mon May 22, 2006 3:07 pm    Post subject: Re: DB2--can the size of the colume be changed..
Reply with quote

Yes, this can be achieved if you are using DB2 V8.

Please refer the following link for find out the allowable schema changes,

http://www.dbazine.com/db2/db2-mfarticles/mullins-onlineschema/view?searchterm=v8 schema

Regards,
Gurmeet
Back to top
View user's profile Send private message
Gurmeet

New User


Joined: 22 Feb 2006
Posts: 46
Location: Pune

PostPosted: Mon May 22, 2006 3:10 pm    Post subject:
Reply with quote

giving the link again...

http://www.dbazine.com/db2/db2-mfarticles/mullins-onlineschema/view?searchterm=v8%20schema
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 Increase the screen size after split mistah kurtz TSO/ISPF 2 Fri Sep 02, 2016 6:39 pm
No new posts ALTER of an IDMS AREA with NEW/OLD pa... Awanti IDMS/ADSO 2 Mon Mar 14, 2016 10:01 pm
No new posts Need help in Finding who changed the ... steve-myers JCL & VSAM 6 Wed Jan 27, 2016 9:01 pm
No new posts Add Trailing Zeroes depending upon th... Rohit Umarjikar DFSORT/ICETOOL 3 Fri Oct 23, 2015 1:47 am
No new posts Data Type and Size senthamizh DB2 2 Fri Aug 21, 2015 2:34 pm


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