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 readingMariaDB 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 readingT-SQL includes a DATE_BUCKET()
function that allows you to arrange data into groups that represent fixed intervals of time. It returns the datetime value that corresponds to the start of each datetime bucket, as defined by the arguments passed to the function.
As far as I’m aware, the DATE_BUCKET()
function is only available in Azure SQL Edge at the time of this writing.
Update: DATE_BUCKET()
was introduced in SQL Server 2022.
In Oracle Database, the JSON_OBJECTAGG()
function creates a JSON object from a key-value pair.
Typically, the property key, the property value, or both are columns of SQL expressions.
Continue readingIn Oracle Database, the JSON_OBJECT()
function creates a JSON object from a sequence of key-value pairs or one object type instance.
In Oracle Database, the JSON_ARRAYAGG()
function creates a JSON array from a column of SQL expressions.
In Oracle Database, the JSON_ARRAY()
function creates a JSON array from a sequence of SQL scalar expressions or one collection type instance, VARRAY
or NESTED TABLE
.
In Oracle Database, the JSON_TABLE()
function creates a relational view of JSON data. It allows you to present the values in a JSON document in table format – as rows and columns.
In Oracle Database, the JSON_VALUE()
function finds a specified scalar JSON value in JSON data and returns it as a SQL value.
In Oracle Database, the JSON_QUERY()
function selects and returns one or more values from JSON data and returns those values.
You can use the function to retrieve fragments of a JSON document.
Continue readingIn MariaDB, the SYSDATE()
and NOW()
functions are similar in that they return the current date and time.
However, there is an important difference: SYSDATE()
returns the time that it executes, whereas NOW()
returns the time that the statement started executing.
And when run within a stored procedure or trigger, SYSDATE()
will return the time that it executes, whereas NOW()
will return the time that the stored procedure or trigger started executing.