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
 

 

Changing the Datatype of a Column

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

New User


Joined: 09 May 2005
Posts: 51
Location: Singapore

PostPosted: Sat May 21, 2005 7:52 pm    Post subject: Changing the Datatype of a Column
Reply with quote

Hi All,

Is it possible to change the data type of a column. I have read and confirmed that Varchar datatype could be changed. Is it not applicable for other datatypes? Do I need to drop and recreate the table?

Thanks,
Vivek
Back to top
View user's profile Send private message

arasu1982

New User


Joined: 05 Mar 2005
Posts: 7
Location: Bangalore

PostPosted: Sat May 21, 2005 8:43 pm    Post subject: Re: Changing the Datatype of a Column
Reply with quote

Hi,
We can't change the datatype of a particular field. If we want to change the data type of a particular field, only option is drop the table and recreate it.


Take care.......
By,
R.Arasu
Back to top
View user's profile Send private message
priya

Moderator


Joined: 24 Jul 2003
Posts: 568
Location: Bangalore

PostPosted: Sat May 21, 2005 9:52 pm    Post subject:
Reply with quote

Yes, you can change the data type of the column.

Check this link:

http://www.ibmmainframes.com/viewtopic.php?t=1665&highlight=change+column+type
Back to top
View user's profile Send private message
kvivek

New User


Joined: 09 May 2005
Posts: 51
Location: Singapore

PostPosted: Mon May 23, 2005 9:56 am    Post subject:
Reply with quote

Hi,

Thanks for your info priya, But I know that Varchar could be changed and I would like to know, whether columns having data type other than Varchar could be changed or not?

Thanks,
Vivek
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 680
Location: NJ

PostPosted: Thu Nov 03, 2005 3:28 pm    Post subject: data type changing
Reply with quote

hi frnd,
the coulumns having data type other than varchar can be changed. but up to my knowldg the caution is v can only have higher prior. ie., small int can be changed to double or any other higher valued data types where as double cannot be changed to small int.
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 DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 2 Sun Nov 06, 2016 8:11 pm
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am
No new posts Add system date inside of a PS file a... pramitdas DFSORT/ICETOOL 5 Sun Aug 28, 2016 12:06 am
No new posts Converting NULL column into NOT NULL ... Raghu navaikulam DB2 5 Sat Aug 06, 2016 3:45 pm


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