In Oracle, the NLS_CHARSET_ID()
function returns the character set ID number of a given character set. You pass the character set name as an argument, and it returns its ID.
Category: DBMS
Database Management Systems
MariaDB JSON_VALUE() vs JSON_QUERY(): What’s the Difference?
In MariaDB, the JSON_VALUE()
function and JSON_QUERY()
function do similar things – they return data from a JSON document.
So what’s the difference?
The main difference is that JSON_VALUE()
returns scalar values, whereas JSON_QUERY()
returns arrays and objects.
FROM_TZ() Function in Oracle
In Oracle Database, the FROM_TZ()
function converts a timestamp value and a time zone to a TIMESTAMP WITH TIME ZONE
value.
You pass the timestamp value and the time zone as two separate arguments, and the function returns them as a TIMESTAMP WITH TIME ZONE
value.
How to Return a List of Valid Time Zones in Oracle Database
Sometimes we need to specify a time zone when using datetime functions in Oracle.
But there are a lot of time zones out there. How do we remember them all? And how do we know our system supports a given time zone?
Fortunately, we can query the V$TIMEZONE_NAMES
view to return a list of valid time zones.
SESSIONTIMEZONE Function in Oracle
In Oracle Database, the SESSIONTIMEZONE
function returns the time zone of the current session.
DBTIMEZONE Function in Oracle
In Oracle Database, the DBTIMEZONE
function returns the value of the database time zone.
How to Check the Date Format of your Oracle Session
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).
How to Check the Values of the NLS Parameters in Oracle Database
In Oracle Database, the NLS (National Language Support) parameters determine the locale-specific behaviour on both the client and the server.
These parameters can be set in various places, such as at the database level, in an initialization parameter file, in environment variables, at the session level, and even within some functions.
You can check the value of the NLS parameters with the following views.
Continue readingADD_MONTHS() Function in Oracle
In Oracle Database, the ADD_MONTHS()
function adds a given number of months to a date, and returns the result.
Methods of Setting NLS Parameters and their Priorities (Oracle Database)
Oracle Database includes a bunch of NLS (National Language Support) parameters that determine the locale-specific behaviour on both the client and the server.
These NLS parameters can be set in various places, each of which has a predetermined precedence order in relation to the others. The following table outlines these methods, as well as their priority in relation to the others.
Continue reading