Use ABS in PL/SQL statement : ABS « Numeric Math Functions « Oracle PL / SQL






Use ABS in PL/SQL statement

  
SQL>
SQL> set serveroutput on
SQL>
SQL>
SQL> BEGIN
  2     DBMS_OUTPUT.PUT_LINE(ABS(3.5));
  3     DBMS_OUTPUT.PUT_LINE(ABS(-3.5));
  4     DBMS_OUTPUT.PUT_LINE(ABS(0));
  5  END;
  6  /
3.5
3.5
0

PL/SQL procedure successfully completed.

SQL>
SQL>

   
  








Related examples in the same category

1.The ABS() function returns the absolute value of a numeric input argument.
2.ABS(x): Returns the absolute value of x
3.ABS: Returns the absolute value of a number or value
4.select abs(13.4) from dual;
5.select abs(-4.5) from dual;
6.select abs(-70 * 415) "Using an expression"
7.ABS(-123) ABS(0) ABS(456) SIGN(-123) SIGN(0) SIGN(456)