You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With NULL a first class citizen, we need to add NULL specific functions, some standard, some extensions, to ease its handling. This is a meta-ticket around the functions planned:
IFNULL/ISNULL/NVL
2 argument variant of COALESCE (IFNULL is a MySQL variant and an ODBC system function, ISNULL is a MS-SQL server variant and NVL comes from Oracle). NVL in particular needs to pay attention to the Oracle semantics.
NULLIF
Takes 2 arguments and returns NULL if the 2 arguments are equal, otherwise it returns the 1st one.
<=> or null-safe equals
This needs investigating as the standard SQL for it seems to be IS (NOT) DISTINCT FROM. H2 has a variation of it x IS (NOT) y.
MySQL variant is the most popular though.
GREATEST/LEAST
Non-standard SQL but implemented by a number of DBs.
The text was updated successfully, but these errors were encountered:
For the time being, we decided not to implement other variants of NVL (e.g.: NVL2) used by Oracle which you can see them listed here: https://oracle-base.com/articles/misc/null-related-functions#nvl2.
NVL2 for example is a particular case of COALESCE that adds some specific handling related to datatypes.
With
NULL
a first class citizen, we need to addNULL
specific functions, some standard, some extensions, to ease its handling. This is a meta-ticket around the functions planned:COALESCE
SQL: Implement COALESCE function #35060The most generic form of null checking with fallback.
IFNULL
/ISNULL
/NVL
2 argument variant of
COALESCE
(IFNULL is a MySQL variant and an ODBC system function, ISNULL is a MS-SQL server variant and NVL comes from Oracle).NVL
in particular needs to pay attention to the Oracle semantics.NULLIF
Takes 2 arguments and returns
NULL
if the 2 arguments are equal, otherwise it returns the 1st one.<=>
or null-safe equalsThis needs investigating as the standard SQL for it seems to be
IS (NOT) DISTINCT FROM
. H2 has a variation of itx IS (NOT) y
.MySQL variant is the most popular though.
GREATEST/LEAST
Non-standard SQL but implemented by a number of DBs.
The text was updated successfully, but these errors were encountered: