MariaDB has a GROUP_CONCAT()
function that enables us to return columns from a query as a delimited list.
Tag: what is
STRING_AGG() Function in PostgreSQL
In PostgreSQL, we can use the STRING_AGG()
function to return columns from a query as a delimited list.
How POSITION() Works in PostgreSQL
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 readingRPAD() Function in PostgreSQL
In PostgreSQL, RPAD()
is a function that enables us to add padding to the right part of a string.
LPAD() Function in PostgreSQL
In PostgreSQL, LPAD()
is a function that enables us to add padding to the left part of a string.
FORMAT() Examples in MySQL
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 readingHow CONCAT_WS() Works in PostgreSQL
In PostgreSQL, the CONCAT_WS()
function concatenates two or more strings, placing a separator between each one. The separator is specified by the first argument.
How the CONCAT() Function Works in PostgreSQL
In PostgreSQL, the CONCAT()
function concatenates the text representations of its arguments.
YEAR() Examples – MySQL
In MySQL, YEAR()
is a built-in date and time function that returns the year from a given date expression.
It returns the year as a number in the range 1000
to 9999
. For zero dates, it could return 0
or NULL
with a warning, depending on the values in your sql_mode
.
The Difference Between INSTR() vs LOCATE() in MariaDB
MariaDB has an INSTR()
function and also a LOCATE()
function. Both functions appear to do exactly the same thing – return the position of a substring within a string.
However, there is a difference.
Continue reading