Definition:
In Oracle PL/SQL, the REAL datatype is a floating-point ANSI SQL data type. Its Oracle equivalent is FLOAT, which has a precision of 63 binary digits. REAL can be used in both SQL and PL/SQL.
Example Syntax:
[VARIABLE] REAL
Example Usage:
In SQL, a table T_REAL is created which contains a column definition of type REAL. This demonstrates the SLQ support for REAL data type.
CREATE TABLE T_REAL
(ID NUMBER,
NUM REAL);
Table created.
The PL/SQL block below declares a REAL variable and assigns a value. This demonstrates PL/SQL support for REAL data type.
DECLARE
L_NUM REAL;
BEGIN
L_NUM := 10;
END;
PL/SQL procedure successfully completed.
Related Links: