Subject changing column type
Author Pablo Sánchez
Hi, i must change a column type from string to integer.
Note that the column is PK.

1. Create new column (column1) with same type (string)

2. Put the values from original column to column1
-> update mytable set column1 = column

3. Change original column type (to integer)

4. Put the values back in the original column (from column1)
-> update mytable set column = column1

5. Drop column1

Now, i : select * from mytable order by original column
shows ordered as if data was string, not numbers.

As i see, there is no automatic conversion here.

Any hints ?
Thanks in advance.
Pablo Sánchez.
pablos EN adinet.com.uy