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 Oracle Database, the INTERSECT
operator is used to create a compound query 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.
The following examples return duplicate rows from an Oracle Database table.
Continue readingIn Oracle Database, the MINUS
operator is used to return only unique rows returned by the first query but not by the second.
Here are four options for returning rows that contain uppercase characters in Oracle Database.
Continue readingBelow are two methods for returning rows that only contain non-alphanumeric characters in Oracle Database.
Alphanumeric characters are alphabetic characters and numeric characters.
Continue readingIn Oracle Database, the UNION
operator allows us to combine the results from two queries into a single 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 readingThe very useful CREATE TABLE IF NOT EXISTS
syntax was finally introduced in Oracle Database – Oracle Database 23c to be precise. This syntax allows us to run a CREATE TABLE
statement without getting an error if the table already exists.
Earlier versions of Oracle don’t support the IF NOT EXISTS
clause, and so if we want to avoid any nasty errors resulting from trying to create a table that already exists, we need to do a bit of extra work.
When using the TO_CHAR()
function in Oracle Database, you can use the RN
format element to return the number as roman numerals. Using lowercase (rn
) returns the roman numerals in lowercase.