In MariaDB, the COALESCE() operator returns the first non-NULL value in the list, or NULL if there are no non-NULL values.
what is
MySQL NULLIF() Explained
In MySQL, NULLIF() is a flow control function that returns NULL if both of its arguments are equivalent. Otherwise it returns the first argument.
JSON_INSERT() vs JSON_SET() vs JSON_REPLACE() in SQLite
SQLite provides several functions for inserting, setting, and replacing values in a JSON document. Specifically, it provides json_insert(), json_set(), and json_replace().
These functions perform similar tasks, and you can sometimes use them interchangeably to a certain point.
But there is definitely a clear difference between each function.
MySQL COALESCE() Explained
In MySQL, the COALESCE() operator returns the first non-NULL value in the list, or NULL if there are no non-NULL values.
SQL Server COALESCE() Explained
In SQL Server, the COALESCE() expression returns its first non-null argument.
The way it works is, we pass a list of arguments to the expression, it evaluates the arguments in order and returns the current value of the first expression that initially doesn’t evaluate to NULL.
Difference Between -> and ->> in SQLite
The -> and ->> operators were introduced in SQLite version 3.38.0, which was released on 22 February 2022. Both operators are used for extracting subcomponents of JSON. But there’s a subtle difference between them.
UPPER() – Convert to Uppercase in PostgreSQL
In PostgreSQL, we can use the upper() function to convert lowercase characters to their uppercase equivalent, according to the rules of the database’s locale.
LOWER() – Convert to Lowercase in PostgreSQL
In PostgreSQL, we can use the lower() function to convert uppercase characters to their lowercase equivalent, according to the rules of the database’s locale.
INITCAP() – Convert to Initial Caps in PostgreSQL
In PostgreSQL, we can use the initcap() function to format a string of text to use initial capitals. That is, it converts the first letter of each word to upper case and the rest to lower case.
SQLite ->> Operator
In SQLite, the ->> operator extracts a subcomponent from a JSON document and returns an SQL representation of that subcomponent.
The ->> operator was first introduced in SQLite version 3.38.0 (released on 22 February 2022).