Hi.
I have created a table
CREATE TABLE testschema.player (
country VARCHAR(80) NOT NULL,
posn VARCHAR(2) not null
)
/
and tried to alter it using
Alter table testschema.player alter column country set data type
Varchar(3)
but it's giving error saying
Error: ALTER TABLE "TESTSCHEMA.PLAYER" specified attributes for column
"COUNTRY" that are not compatible with the existing column.
Can anybody help and tell the reason?
Lennart - 28 Jun 2007 12:26 GMT
> Hi.
>
[quoted text clipped - 15 lines]
>
> Can anybody help and tell the reason?
[lelle@53dbd181 lelle]$ db2 "? SQL0190N"
SQL0190N ALTER TABLE "<table-name>" specified attributes for
column "<column-name>" that are not compatible with the
existing column.
Explanation:
[...]
- the length of the column is greater than the length specified
in the clause
sandy - 29 Jun 2007 11:13 GMT
> Hi.
>
[quoted text clipped - 15 lines]
>
> Can anybody help and tell the reason?
U cannot decrease the size of the column.(VARCHAR(80) to
VARCHAR(3) )..Try Using SYSPROC.ALTOBJ procedure..
Thanks