Subject | Changing col from Time to Timestamp |
---|---|
Author | tickerboo2002 |
Post date | 2007-01-29T13:23:01Z |
I have a database out in the wild that contains a table with a column
of type Time. It should be of type Timestamp. How would I go about
changing my users' databases?
My first inclination is to try the following:
1. Rename existing column to TIME_Old
2. Create a new column TIME of type TimeStamp
3. Perform an update on the table, copying everything from TIME_Old to
TIME
4. Delete TIME_Old column
It's step 3 I'm not too sure about. Is it possible to execute an
UPDATE statement where the contents of one column (TIME_Old) are
copied to another column (TIME) ? If so, is there any special syntax
for it?
TIA
David
of type Time. It should be of type Timestamp. How would I go about
changing my users' databases?
My first inclination is to try the following:
1. Rename existing column to TIME_Old
2. Create a new column TIME of type TimeStamp
3. Perform an update on the table, copying everything from TIME_Old to
TIME
4. Delete TIME_Old column
It's step 3 I'm not too sure about. Is it possible to execute an
UPDATE statement where the contents of one column (TIME_Old) are
copied to another column (TIME) ? If so, is there any special syntax
for it?
TIA
David