Oracle CASE Expression

In Oracle Database, the CASE expression compares a list of conditions and returns one of multiple possible expressions. It allows us to use IF … THEN … ELSE logic in SQL statements without having to invoke procedures.

The CASE expression is included in the SQL standard (ISO/IEC 9075), and most major RDBMSs support it.

Oracle also has a CASE statement that’s very similar to the CASE expression, but with some minor differences.

Read more

MySQL CASE Operator

In MySQL, the CASE operator compares a list of conditions and returns one of multiple possible result expressions.

The CASE expression is included in the SQL standard (ISO/IEC 9075), and most major RDBMSs support it.

MySQL also has the CASE statement, which is slightly different to the CASE operator. This article is about the CASE operator.

Read more

MariaDB CASE Operator

In MariaDB, we can use the CASE operator to compare a list of conditions and return a different result depending on which condition (if any) is matched.

The CASE expression is included in the SQL standard (ISO/IEC 9075), and most major RDBMSs support it.

MariaDB also has the CASE statement, which is slightly different to the CASE operator. This article is about the CASE operator.

Read more

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).

Read more