If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > How to change the table column data type in DB2 7.1 window version????

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-26-07, 04:04
Coolhard Coolhard is offline
Registered User
 
Join Date: Aug 2005
Posts: 24
Unhappy How to change the table column data type in DB2 7.1 window version????

Dear All,

Could u pls help me this? I would like to change one of table column data type from Decimal to Integer in DB2 UDB 7.1(window version).
I don't see any function to change in Control center or don't see the command in information center reference.
May I know I can do that or not?
If yes,how to do it?
If not,is there any suggetion pls?

Help me pls

Thanks,
Reply With Quote
  #2 (permalink)  
Old 03-26-07, 07:31
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
Hi,
1. rename table
2. create table with integer column definitions
3. execute sql: insert into new_table select * from old_table.

Hope this helps,
Grofaty
Reply With Quote
  #3 (permalink)  
Old 03-26-07, 22:34
Coolhard Coolhard is offline
Registered User
 
Join Date: Aug 2005
Posts: 24
Thanks a lot, grofatty.
Really appreciate your suggetion.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On