Here are three examples of using SQL to find and select the row with the minimum value in a given column.
The examples work in most major RDBMSs, including MySQL, MariaDB, PostgreSQL, SQLite, Oracle, and SQL Server.
Continue readingHere are three examples of using SQL to find and select the row with the minimum value in a given column.
The examples work in most major RDBMSs, including MySQL, MariaDB, PostgreSQL, SQLite, Oracle, and SQL Server.
Continue readingIn MariaDB, SHOW TABLES
is an administrative statement that lists the non-TEMPORARY
tables, sequences and views in a given database.
If you ever encounter a character column that should be a numeric column, there’s always a possibility that it contains non-numeric data that you don’t know about.
In MariaDB, you can run a query like the following to return non-numeric data from the column.
Continue readingIn 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).
In MariaDB, the UNION
operator combines the results from multiple SELECT
statements into a single result set.
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.
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.
Here are five options for using SQL to return only those rows that have the maximum value within their group.
These examples work in most major RDBMSs, including MySQL, MariaDB, Oracle, PostgreSQL, SQLite, and SQL Server.
Continue readingHere are three examples that use SQL to find and select the row with the maximum value in a given column.
The examples work in most major RDBMSs, including MySQL, MariaDB, PostgreSQL, SQLite, Oracle, and SQL Server.
Continue readingBelow are four ways to list out the views in a MariaDB database using SQL or the command line.
Continue reading