How to fix the Oracle error PLS-00719: only widening of attribute ‘string’ constraints is allowed?
In this post, you’ll learn more about the Oracle ErrorPLS-00719: only widening of attribute ‘string’ constraints is allowed with the details on why you receive this error and the possible solution to fix it.
Oracle Error Description
PLS-00719: only widening of attribute ‘string’ constraints is allowed
Reason for the Error PLS-00719: only widening of attribute ‘string’ constraints is allowed
Modification to the attribute did not widen its constraints or attempted to change the type of the attribute. For NUMBER type attributes, scale and precision can be changed to allow increase in number of digits after and before the decimal point. For VARCHAR2 and RAW type attributes the size can be increased. Other type attributes are not allowed to be modified. Change of type of attribute is also not allowed.
How to fix the Error PLS-00719: only widening of attribute ‘string’ constraints is allowed ?
You can fix this error in Oracle by following the below steps
Change the constraint specification so as to widen the existing constraints.To narrow the constraints or to change the type of the attribute, you must drop the attribute and add it with new constraints or new type. In that case you must also take appropriate steps to preserve your existing data based on the type (if you want to preserve it).Typically this will involve backing up the data and restoring it after the ALTER TYPE.
Leave Your Comment