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

Changing the Datatype of a Column


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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
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
Reply with quote

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

Check this link:

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
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: 677
Location: NJ

PostPosted: Thu Nov 03, 2005 3:28 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts How to load to DB2 with column level ... DB2 6
No new posts RC query -Time column CA Products 3
No new posts changing defaults in db2 admin - Unlo... DB2 0
No new posts first column truncated in search result IBM Tools 13
No new posts Split a record with data in a differe... DFSORT/ICETOOL 8
Search our Forums:

Back to Top