The negation and identity operators in action. : Operators « PL SQL Operators « Oracle PL/SQL Tutorial






SQL>
SQL> SET SERVEROUTPUT ON
SQL> DECLARE
  2    x   NUMBER;
  3  BEGIN
  4    DBMS_OUTPUT.PUT_LINE(-242.24);
  5    x := 5;
  6    DBMS_OUTPUT.PUT_LINE(-x);
  7     x := -5;
  8     DBMS_OUTPUT.PUT_LINE(-x);
  9     DBMS_OUTPUT.PUT_LINE(+10);
 10     DBMS_OUTPUT.PUT_LINE(+x);
 11  END;
 12  /
-242.24
-5
5
10
-5

PL/SQL procedure successfully completed.

SQL>








23.1.Operators
23.1.1.Operators
23.1.2.The basic arithmetic operators in action
23.1.3.Logical Operators in PL/SQL
23.1.4.Running Anonymous Blocks of Code
23.1.5.Arithmetic Operators
23.1.6.Exponentiation
23.1.7.The negation and identity operators in action.
23.1.8.Comparison Operators
23.1.9.The Relational Operators: =, <>, !=, ~=, <, >, <=, >=
23.1.10.Logical Operators
23.1.11.String Operators
23.1.12.Use of Comparison Operators with Strings