How to alter a column datatype for derby database?

Here is the Derby SQL script to change column MY_TABLE. MY_COLUMN from BLOB(255) to BLOB(2147483647): ALTER TABLE MY_TABLE ADD COLUMN NEW_COLUMN BLOB(2147483647); UPDATE MY_TABLE SET NEW_COLUMN=MY_COLUMN; ALTER TABLE MY_TABLE DROP COLUMN MY_COLUMN; RENAME COLUMN MY_TABLE. NEW_COLUMN TO MY_COLUMN.

Here's a slightly more complicated way to alter the column's data type in this fashion: Add a new column, of the desired data type Issue "update ... set new-column = old-column to copy the data from the old column to the new column drop the old column Rename the new column to have the name of the old column. Slightly more steps, but in the end the effect will be the same. If you have trouble working out the exact details of the SQL to do this, let us know and we'll help.

Posgtes Solution : ALTER TABLE prices_table ALTER price_column TYPE decimal (7,2 ).

I think Derby does not support TYPE, it displays error, Syntax error: Encountered "TYPE" at line 1, column 30. – jl. Mar 5 '10 at 6:53.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions