Database Error Messages

Release
toggle
  • 23ai
  • 21c
  • 19c
Updated
Jun 24, 2024

PLS-00488

'string' must be a type

Cause

The datatype specifier in a declaration or expression does not designate a legal type. For example, the %TYPE attribute might not have been added to a declaration, as in DECLARE my_sal emp.sal%TYPE; my_ename emp.ename; -- missing %TYPE ... When declaring a constant or variable, to provide the datatype of a column automatically, use the %TYPE attribute. Likewise, when declaring a record, to provide the datatypes of a row automatically, use the %ROWTYPE attribute.


Action

Make sure the datatype specifier designates a legal type. Remember to use the %TYPE and %ROWTYPE attributes when necessary.