rules repository

G-2510

🆓
Warning

Avoid using the LONG and LONG RAW data types.

Reason

long and long raw data types have been deprecated by the Oracle Database since version 8i and provided for backward compatibility only.

There are many constraints to long datatypes in comparison to the lob types. Oracle strongly recommends to use lob instead of long data types.

Example

Non-Compliant Example

declare
   l_long long;
   l_raw  long raw;
begin
   do_something(l_long);
   do_something(l_raw);
end;
/
Issues
LineColumnMessage
211Deprecated LONG data type used.
311Deprecated LONG RAW data type used.

Compliant Solution - ★★★★★

declare
   l_long clob;
   l_raw  blob;
begin
   do_something(l_long);
   do_something(l_raw);
end;
/

References