In MySQL, the JSON_VALUE()
function extracts a value from a JSON document at the specified path.
The function was introduced in MySQL 8.0.21.
Continue readingIn MySQL, the JSON_VALUE()
function extracts a value from a JSON document at the specified path.
The function was introduced in MySQL 8.0.21.
Continue readingMany RDBMSs have an INSTR()
function that enables us to find a substring within a string. Some (such as MySQL and MariaDB) also have a LOCATE()
function and a POSITION()
function (also supported by PostgreSQL), that do a similar thing.
SQL Server doesn’t have an INSTR()
function. Nor does it have a LOCATE()
or POSITION()
function. But it does have the CHARINDEX()
function that does the same thing.
SQL Server also has the PATINDEX()
function, which does a similar job to CHARINDEX()
.
MySQL has a GROUP_CONCAT()
function that enables us to return columns from a query as a delimited list.
It returns a string result with the concatenated non-NULL
values from a group.
In Oracle, the LISTAGG()
function enables us to combine data from multiple rows in to a single row.
We have the option of specifying a separator (such as a comma). We can also order the results produced by the LISTAGG()
function, and more.
MariaDB has a GROUP_CONCAT()
function that enables us to return columns from a query as a delimited list.
In PostgreSQL, we can use the STRING_AGG()
function to return columns from a query as a delimited list.
PostgreSQL has a POSITION()
function that returns the first starting index of a specified substring within a string.
If the substring doesn’t exist in the string, then zero is returned.
Continue readingIn PostgreSQL, RPAD()
is a function that enables us to add padding to the right part of a string.
In PostgreSQL, LPAD()
is a function that enables us to add padding to the left part of a string.
In MySQL, the FORMAT()
function returns a number formatted to a specified number of decimal places.
It includes group separators and a decimal separator where applicable.
Continue reading