We saw in another article how to build an array from an SQL query (from each row, or from a column). This article shows how to loop over an array items.
Different databases support different ways to get the first and last day of the month. Let’s see how to do it in MariaDB and MySQL.
It is well-known how to get the highest and lowest values in a table column, but it is a bit less known how to get the highest and lowest values in a row. Let’s see how to do it.
Let’s see a slightly elaborated “Hello world”, to demonstrate the most common SQL operations with MariaDB: creating a database and a table, inserting a row, reading it, modifying it, deleting it.
There are several ways to concatenate strings in SQL, and they mainly differ in how they handle
PostgreSQL allows to create, read and write tables without columns. Let’s see how to work with them, and whether they can have practical uses.
RIGHT JOINs can always be rewritten as
LEFT JOINs, and some people consider
RIGHT JOINs a bad practice. This article explains why.
In PostgreSQL, string comparisons are case-sensitive by default. Making them case-insensitive requires the ILIKE operator and may require an additional index for performance reasons.
How to find values in a table column that are above (or below) the average of that column.
HAVING have different functions. But they both filter out rows, so many people don’t know the important difference between them. Let’s shred some light.