NUMBER and BINARY_INTEGER Data types : BINARY_INTEGER DOUBLE FLOAT « PL SQL Data Types « Oracle PL/SQL Tutorial






SQL>
SQL> set timing on
SQL> declare
  2      v_nr number;
  3  begin
  4      for i in 1..1000000 loop
  5          v_nr:=v_nr+i-i+i*2-i*2;
  6      end loop;
  7      DBMS_OUTPUT.put_line(v_nr);
  8  end;
  9  /

PL/SQL procedure successfully completed.

Elapsed: 00:00:00.93
SQL>
SQL> declare
  2      v_nr binary_integer;
  3  begin
  4      for i in 1..1000000 loop
  5          v_nr:=v_nr+i-i+i*2-i*2;
  6      end loop;
  7      DBMS_OUTPUT.put_line(v_nr);
  8  end;
  9  /

PL/SQL procedure successfully completed.

Elapsed: 00:00:00.25
SQL>
SQL> set timing off








21.33.BINARY_INTEGER DOUBLE FLOAT
21.33.1.BINARY_INTEGER
21.33.2.BINARY_INTEGER Subtypes
21.33.3.BINARY_INTEGER in action
21.33.4.NUMBER and BINARY_INTEGER Data types
21.33.5.Using BINARY_FLOAT and BINARY_DOUBLE for complex calculations