Kayshav.com
About Developer Oracle 11g Technology Information Sitemap

Oracle 11g - Simple_Float
-- Oracle 11g - Simple_Float Analysis
-- The simple_float can be used when the variable will always have a value. If the 
-- variable declared as simple_float becomes null can it will error out (PLS-00382)
-- as shown in output.  Due to arithmetic processing at hardware level, this 
-- provides improved PL/SQL performance when the variable will always have a value
-- and utilize less space in the database, when intense numeric computations are 
-- performed.  It is the same with SIMPLE_DOUBLE.

SET SERVEROUTPUT ON SIZE 1000000;

DECLARE
 i_val    SIMPLE_FLOAT := &i_val;
 i_sqrt   SIMPLE_FLOAT := 0;

BEGIN
 SELECT SQRT(i_val) INTO i_sqrt FROM DUAL;

 DBMS_OUTPUT.PUT_LINE(' Value = '||i_val||' Square Root = '||i_sqrt);
END;
/

-- Output
Oracle 11g Simple_Float Analysis

Oracle 11g - Simple_Integer

Oracle 11gXEr2 - Index

Oracle registered trademark of Oracle Corporation.

Last Revised On: September 19, 2014

  39895