In PostgreSQL, the EXCEPT operator returns rows that are returned by the left input query that aren’t returned by the right input query. This can also be referred to as the difference between two queries.
what is
Oracle UNION Operator Explained
In Oracle Database, the UNION operator allows us to combine the results from two queries into a single result set.
MariaDB MINUS Operator Explained
In MariaDB, the MINUS operator returns distinct rows from the left input query that aren’t output by the right input query.
The MINUS operator was introduced in MariaDB 10.6.1 as a synonym for the EXCEPT operator for the purposes of compatibility with Oracle. Therefore, we can use MINUS and EXCEPT interchangeably (in MariaDB 10.6.1 and later).
MariaDB INTERSECT Operator Explained
In MariaDB, the INTERSECT operator intersects two queries and returns only those rows that are returned in both queries.
It returns all rows from the left SELECT result set that are also present in the right SELECT result set.
MariaDB EXCEPT Operator Explained
In MariaDB, the EXCEPT operator returns rows from the left input query that aren’t output by the right input query.
Another way of putting it is that it returns all rows from the left SELECT result set except rows that are in right SELECT result set.
How the JSONPath Wildcard Step (**) Works in MariaDB
When working with JSON in MariaDB, you can use JSONPath expressions to manipulate data within a JSON document.
One powerful feature that MariaDB provides is the wildcard step (**). This allows you to recursively select all child elements of the current element.
The wildcard step is a non-standard extension, and it’s also supported with the same meaning in MySQL.
How NULLIF() Works in SQL Server
In SQL Server, the NULLIF() expression checks the value of two specified expressions. It returns a null value if they’re equal, otherwise it returns the first expression.
SCHEMA() Function in MySQL
In MySQL, the SCHEMA() function is a synonym for the DATABASE() function. It returns the default (current) database name.
The result is returned as a string in the utf8 character set. If there is no default database, it returns NULL.
SUM() Function in PostgreSQL
In PostgreSQL, the SUM() function computes the sum of the non-null input values and returns the result.
In other words, it adds numbers and returns the result.