In SQLite, the INTERSECT
operator is used to create a compound SELECT
statement that returns the intersection of the results of the left and right SELECT
statements. In other words, it combines two queries, but returns only those rows that are returned in both queries.
Category: SQLite
SQLite EXCEPT Operator
In SQLite, the EXCEPT
operator can be used to create a compound SELECT
statement that returns the subset of rows returned by the left SELECT
that are not returned by the right SELECT
.
SQLite UNION Operator
In SQLite, the UNION
operator creates a compound SELECT
statement that returns the results of the left and right SELECT
statements. In other words, it combines the results from two queries into a single result set.
5 Ways to Select Rows with the Minimum Value for their Group in SQL
Here are five options for using SQL to return only those rows that have the minimum value within their group.
These examples work in most major RDBMSs, including MySQL, MariaDB, Oracle, PostgreSQL, SQLite, and SQL Server.
Continue reading3 Ways to Select the Row with the Minimum Value in SQL
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 reading3 Ways to Find Rows that Contain Lowercase Letters in SQLite
Here are three options for returning rows that contain lowercase characters in SQLite.
Continue readingReturn Rows that Only Contain Non-Alphanumeric Characters in SQLite
Here’s an example of returning rows that contain only non-alphanumeric characters in SQLite.
Non-alphanumeric characters include punctuation characters like !@#&()–[{}]:;',?/*
and symbols like `~$^+=<>“
, as well as whitespace characters like the space or tab characters.
6 Ways to Select Duplicate Rows in SQLite
The following queries can be used to return duplicate rows in SQLite.
Here, the duplicate rows contain duplicate values across all columns, including the ID column.
Continue reading5 Ways to Select Rows with the Maximum Value for their Group in SQL
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 reading3 Ways to Select the Row with the Maximum Value in SQL
Here 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 reading