How to fix the Oracle error PLS-00510: Float cannot have scale?

In this post, you’ll learn more about the Oracle ErrorPLS-00510: Float cannot have scale with the details on why you receive this error and the possible solution to fix it.

Oracle Error Description

PLS-00510: Float cannot have scale

Reason for the Error PLS-00510: Float cannot have scale

When a FLOAT variable was declared, its precision and scale were specified, as shown in the following example: DECLARE Salary FLOAT(7,2); However, a scale for FLOAT variables cannot be specified; only a precision can be specified, as in salary FLOAT(7);

How to fix the Error PLS-00510: Float cannot have scale ?

You can fix this error in Oracle by following the below steps

Remove the scale specifier from the declaration, or declare a NUMBER variable instead.