When using Oracle Database, you can find out what territories are supported by querying the V$NLS_VALID_VALUES
view.
This view lists all valid values for NLS parameters, including supported territories.
Continue readingDatabase Management Systems
When using Oracle Database, you can find out what territories are supported by querying the V$NLS_VALID_VALUES
view.
This view lists all valid values for NLS parameters, including supported territories.
Continue readingIn Oracle Database, the CURRENT_TIMESTAMP()
function returns the current date and time in the session time zone, in a value of data type TIMESTAMP WITH TIME ZONE
.
It’s similar to LOCALTIMESTAMP
, except that LOCALTIMESTAMP
returns a TIMESTAMP
value.
In Oracle Database, the LOCALTIMESTAMP()
function returns the current date and time in the session time zone in a value of data type TIMESTAMP
.
It’s similar to CURRENT_TIMESTAMP
, except that CURRENT_TIMESTAMP
returns a TIMESTAMP WITH TIME ZONE
value.
In Oracle Database, the SYSTIMESTAMP
function returns the system date, including fractional seconds and time zone, of the system on which the database resides.
The returned value is of type TIMESTAMP WITH TIME ZONE
.
In Oracle Database, the SYSDATE
function returns the current date and time set for the operating system on which the database server resides.
The returned value is of type DATE
.
In Oracle Database, the EXTRACT(datetime)
function extracts and returns the value of a specified datetime field from a datetime or interval expression.
In Oracle, the TRANSLATE(...USING)
function converts its argument into the character set specified for conversions between the database character set and the national character set.
This function is not to be confused with the TRANSLATE()
function, which allows you to make several single-character, one-to-one substitutions in one operation.
The TRANSLATE(...USING)
function is supported in Oracle primarily for ANSI compatibility. Oracle recommends that we use the TO_CHAR()
and TO_NCHAR()
functions instead.
In Oracle, the LENGTH()
function returns the length of its argument.
LENGTH()
can also be thought of as a group of functions. There are five separate functions; LENGTH()
, LENGTHB()
, LENGTHC()
, LENGTH2()
, and LENGTH4()
. Each function calculates the length in a different way.
When working with functions that return dates, Oracle Database returns these dates based on the value of the NLS_DATE_FORMAT
parameter.
There is also an NLS_TIMESTAMP_FORMAT
parameter and an NLS_TIMESTAMP_TZ_FORMAT
parameter, both of which have a datetime format mask that can be specified separately.
All of these parameters have their default values derived from the NLS_TERRITORY
parameter (which by default, is operating system-dependent).
So, to change the date format for your session, you can either update the NLS_TERRITORY
parameter, or explicitly update each parameter individually.
This article provides examples of checking and changing these values, and viewing the results.
Continue readingBelow is a list of numeric functions in Oracle Database.
Continue reading