Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 The Oracle PL/SQL SQRT Function      [Return To Index] Jump to:  
  Looking for the original pages? (formerly called "Morgan's Library") You can find them here.

Term: SQRT

Definition:
In Oracle PL/SQL, SQRT is a built in function which returns the square root of a numeric input. It returns positive output if the input argument is a number. For negative input arguments, it raises ORA-01428 exception.

Example Syntax:

SQRT(x)


Example Usage:

The SQL below shows that SQRT function raises exception when used with negative number.

SQL> select sqrt(-3) from dual;
select sqrt(-3) from dual
*
ERROR at line 1:
ORA-01428: argument '-3' is out of range


The SQL statement below returns the square root of 3.

SQL> SELECT SQRT(3) FROM DUAL;

SQRT(3)
----------
1.73205081



Related Links:
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 252 users online    © 2009 psoug.org
PSOUG LOGIN
Username: 
Password: 
Forgot your password?