When using T-SQL with SQL Server, we can format numbers using various methods, depending on our desired format.
Below are four functions that can be used to format a number to two decimal places in SQL Server.
When using T-SQL with SQL Server, we can format numbers using various methods, depending on our desired format.
Below are four functions that can be used to format a number to two decimal places in SQL Server.
Here are three options for returning rows that contain lowercase characters in SQLite.
Here are four methods you can use to find duplicate rows in SQL Server.
By “duplicate rows” I mean two or more rows that share exactly the same values across all columns.
Here are three examples of returning a list of stored procedures that reference a specific table in PostgreSQL.
Here are three options for listing out the triggers for a given table in PostgreSQL.
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.
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.
The 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.
If you need to return all rows that don’t contain any numbers, the following might help.
Strictly speaking, numbers can be represented by words and other symbols, but for this article “number” simply means “numerical digit”. So we’re finding values that don’t contain any numerical digits.