Introduction to Manipulating Data using Functions in Oracle
When using data from the database, you may find that you want to massage the data to fit your needs.
For example, you may want to combine the city, state, and zip code together when printing out a mailing label.
This module covers several built-in SQL functions that you have seen before but that have a slightly different syntax when done in Oracle.
This module also covers functions that are exclusive Oracle extensions to SQL.
By the end of this module, you will be able to:
List character (string) functions unique to Oracle or different in Oracle
Interpret the effect of number functions
Identify valid date-related date functions and Oracle's standard date format
Identify valid time-related date/time functions
NVL to modify query results
The module looks at functions by focusing on functions for character fields, for number fields, and for date/time fields.
The next several lessons discuss some functions that operate on character strings.
A function is a built-in PL/SQL program that always returns a single value. You can use the predefined functions or you can create your own.
A function always returns a single value, as opposed to a procedure, which is a similar type of program but is able to return more than one value.
You can call a function within a query or other SQL command.
Use the NVL function to convert null values before comparing them.