Skip to Main Content
SQL in a Nutshell, 3rd Edition
book

SQL in a Nutshell, 3rd Edition

by Kevin Kline
November 2008
Intermediate to advanced content levelIntermediate to advanced
591 pages
17h 28m
English
O'Reilly Media, Inc.
Content preview from SQL in a Nutshell, 3rd Edition

Oracle-Supported Functions

This section provides an alphabetical listing of the SQL functions specific to Oracle, with examples and corresponding results.

ACOS(number)

Returns the arccosine of number ranging from −1 to 1. The result ranges from 0 to π and is expressed in radians. For example:

SELECT ACOS( 0 ) FROM DUAL -> 1.570796
ADD_MONTHS(date, int)

Returns the date plus int months. For example:

SELECT ADD_MONTHS('15-APR-1999', 3) FROM DUAL -> 15-JUL-99
APPENDCHILDXML(xml_fragment, xpath, value[, namespace])

Injects value into the XML fragment xml_fragment at the location specified by the XPath expression xpath and returns the result. The optional namespace argument provides the namespace information for the XPath expression. For example:

SELECT APPENDCHILDXML('<a><b>B</b></a>', '/a', '<c>C</c>') FROM DUAL
'<a><b>B</b><c>C</c></a>'
ASCII(text)

Returns the ASCII code of the first character of text. For example:

SELECT ASCII('x') FROM DUAL -> 120
ASCIISTR(text)

Converts text from any character set into an ASCII equivalent. Characters in text that have no equivalent in ASCII will be replaced with the string \XXXX, where XXXX represents the UTF-16 code unit. For example:

SELECT ASCIISTR('ÄBC') FROM DUAL -> '\00C4BC'
ASIN(number)

Returns the arcsine of number ranging from −1 to 1. The resulting value ranges from -π/2 to π/2 and is expressed in radians. For example:

SELECT ASIN( 0 ) FROM DUAL -> 0.000000
ATAN(number)

Returns the arctangent of any number. The resulting value ranges from -π/2 to π/2 and ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Effective SQL: 61 Specific Ways to Write Better SQL, First Edition

Effective SQL: 61 Specific Ways to Write Better SQL, First Edition

John L. Viescas, Douglas J. Steele, Ben G. Clothier
SQL in a Nutshell, 4th Edition

SQL in a Nutshell, 4th Edition

Kevin Kline, Regina O. Obe, Leo S. Hsu

Publisher Resources

ISBN: 9780596155322Errata Page