I need to change a database column from integer to string/text but I am not sure how to go about it.
This column is meant to store identification numbers, but recently the ID format changed and now the IDs contain ASCII characters as well (so with this change the new IDs cannot be stored as integers).
The application I am updating is written in Delphi 7 and uses the odbcexpress components for the SQL Server library.
Is it possible to use ALTER TABLE
for this? Or does the data need to be copied to a new column as string, delete the old column, and rename the column to the old name?
Can you provide an example on how I might do this? I am not very familiar with the workings of SQL Server.
Thanks!