Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
No new posts Convert rows and column into JSON for... Dinesh Manivannan DB2 2 Sun Sep 03, 2017 6:50 pm
No new posts Changing sort Card Dynamically vickey_dw DFSORT/ICETOOL 5 Sat Aug 19, 2017 2:33 pm
No new posts Select numeric portion from CHAR data... balaji81_k DB2 6 Sat Aug 19, 2017 1:51 am
No new posts BI,TO=ZD Changing Values Tyler Dunbar DFSORT/ICETOOL 4 Tue Jul 25, 2017 12:12 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us