All Forums Database
RGlass 35 posts Joined 09/04
13 Jul 2006
Syntax to Alter table

What's the syntax to alter table:col(smallint) needs to be changed to integer..Tbob

mahyan 6 posts Joined 07/06
14 Jul 2006

Hi Tbob,I don't think we can directly alter a column from smallint to integer.If tried , it gives this error -3558: Can not alter the specified attributes.The Explaination of this error says -Most column attributes cannot be modified after the column is created. Exceptions are those attributes which can be changed without changing the internal storage of the data.In this case, we are trying to alter the internal storage definition for the column, and thus this operation would not be allowed.The solution is to Recreate the table with new definition & then copying data from old table to new table.

RGlass 35 posts Joined 09/04
14 Jul 2006

Thanks for the response Mayhan,I guess I was misinterpreting the DDL manual.Tbob

You must sign in to leave a comment.