Follow us: Connect on YouTube Connect on YouTube Connect on YouTube

Pages

Thursday, 31 March 2016

SQL-Abs

Absolute value is the measure of the magnitude of value.
     Absolute value is always a positive number.

     Syntax: abs (value)

     Ex:
          SQL> select abs(5), abs(-5), abs(0), abs(null) from dual;

                     ABS(5)    ABS(-5)     ABS(0)  ABS(NULL)
                     ---------- ----------    ---------- -------------

                          5              -5                0




You May Like                                          
                            SQL Sign
                            SQL Sqrt
                            SQL Mod
                            SQL NVL
                            SQL NVL2
                            SQL Power
                            SQL Exp
                            SQL Ln
                            SQL Log
                            SQL CEIL
                            SQL Floor
                            SQL Round
                            SQL Trunc
                            SQL Bitand
                            SQL Greatest
                            SQL Least
                            SQL Coalesce

Share this article :

2 comments:

  1. Hi Bro,


    What you’re saying is absolutely correct SQL-Abs, but this isn’t the exact situation everywhere. Where most smart folk work on a project - why can’t you do this the Boss asks :).


    from foll. select, how can i get unique values for screen_type and screen

    select a.EMP_NO,a.SCREEN, b.SCREEN_TYPE
    from EMPLOYEE_TAB a, SCREEN_TAB b
    where a.id = b.ID
    and SCREEN_TYPE like '%S';

    EMP_ID SCREEN SCREEN_TYPE
    EMP_123 SCR100 SCRTYPE100S
    EMP_124 SCR100 SCRTYPE100S
    EMP_125 SCR100 SCRTYPE100S
    EMP_127 SCR102 SCRTYPE102S
    EMP_128 SCR102 SCRTYPE102S
    EMP_135 SCR102 SCRTYPE102S
    EMP_136 SCR102 SCRTYPE102Sv


    THANK YOU!! This saved my butt today, I’m immensely grateful.


    Gracias

    ReplyDelete
  2. Hi There,

    The challenge however, is we don’t yet know how it will be used making to hard to assess their value proposition and consequently value.

    how to apply refcursor in package with multiple insted of multple cursors in oracle?
    Give one example.

    Thank you very much and will look for more postings from you.

    Regards,
    Preethi.

    ReplyDelete