Subject Altering Numeric datatype to Numeric (15,5)
Author porapu
Hi to one and All.In my working database some columns are created with Numeric datatype whose precision and scale is Numeric(15,2) where I want only 2 decimals.So if I am trying to Alter the scale of that column ie to Numeric(15,5) SQL is throwing the error like below

Unsuccessful metadata update
Newscale specified for the column must be at most 2

I used the below query to Alter the scale

ALTER TABLE EMP ALTER NOTINT TYPE Numeric(15,5)

If I am trying to create the column with Numeric(15,5) it is working fine.

But I want to alter the columns whose scale is Numeric(15,2) to Numeric(15,5) through coding..It is giving the above error.Please can any one help me regarding this..