Oracle Error PLS-00108: declarative units must be a single variable declaration

Oracle Error Message

PLS-00108: declarative units must be a single variable declaration

Reason for the Error

While checking a declarative unit (a top-level declare block without the BEGIN…END), PL/SQL found that there was more than one item declared or that the item was not a variable declaration. A table is a common variable declaration at the unit level. To define a TABLE, compile a DECLARE compilation unit, but only one at a time is allowed.

Solution

Declare variables in separate declarative units.