O'Reilly logo

SQL Bible, Second Edition by Boris M. Trukhnov, Alex Kriegel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix G. SQL Functions

Every RDBMS maintains an ever-expanding list of the SQL functions covered in Chapter 10 of this book. This appendix provides a comprehensive list of the functions available for each RDBMS in its current version: Oracle 11 g, IBM DB2 9.5, and Microsoft SQL Server 2008.

All the functions are grouped in Tables G-1 through G-30 similarly to the way they are organized in each corresponding vendor's documentation. Oracle 11 g allows overloading of the functions, meaning that some functions can be used in more than one way depending on the data type and number of arguments; because of that such functions are listed in several categories. Both IBM DB2 9.5 and Microsoft SQL Server 2008 are utilizing overloading to a much lesser extent.

Certain functions require appropriate privileges to be run, and some functions return results that cannot be meaningfully displayed (binary, object, table value, and so on). We've omitted the arguments of the functions from the tables, because the purpose of the appendix is to show what is available, without going into too much detail. Refer to each vendor's documentation for more detailed syntax and explanations.

Table G.1. Oracle 11g SQL Number Functions

Function Name

Brief Description

ABS

Returns the absolute value of n.

ACOS

Returns the arc cosine of n.

ASIN

Returns the arc sine of n.

ATAN

Returns the arc tangent of n.

ATAN2

Returns the arc tangent of n and m.

BITAND

Returns an integer representing an AND operation on the bits of the two expressions ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required