Changing field from int to char in table when database is on

Posted by vithal.kattikar@hgst.com on 01-Oct-2015 04:30

Hi

Is it possible to change table field from int to char when the database is online (when database is  running.)

All Replies

Posted by Tim Kuehn on 01-Oct-2015 14:07

It's not possible to directly change a field in that manner -

The process to make that change would be:

1) Rename field

2) Add new field with the correct data type

3) Copy the old field data to the new field, type corrected

4) Add indexes which use the new field instead of the old field

5) Delete indexes that use the old field

6) Delete the old field.

Posted by gus on 02-Oct-2015 11:35

7) recompile application

This thread is closed