The following sections describe some of the more useful scalar functions, which return one value per row when invoked from a SQL statement. Conversion functions are described earlier in the "Dataype Conversion" section. Aggregate functions, which combine values from many rows into one result, are described later in "Grouping and Summarizing." Window functions, which return aggregate values in detail rows, are described later in the "Window Functions" section.
MySQL requires the leading parenthesis of the argument list to immediately follow a function's name. For example,
UPPER (name) will generate an error message because of the space between
Oracle implements a wide variety of helpful functions for working with dates and times.
It's common to need the current date and/or time of day. SYSDATE is often used for that purpose:
SELECT SYSDATE FROM dual;2006-02-07 09:32:32.0
You can use ALTER SESSION to specify a default date format for your session using the date format elements described earlier in Table 1.
ALTER SESSION SET NLS_DATE_FORMAT = 'dd-Mon-yyyy hh: mi:ss';
Following is a complete list of Oracle functions to return current datetime information:
Returns the current date in the session time zone as a value of type DATE.
Returns the current date and time in the session time zone as a value of type TIMESTAMP WITH TIME ZONE. The precision ...