Here are three examples of returning rows that contain alphanumeric characters in SQL Server.
Alphanumeric characters are alphabetic and numeric characters.
Continue readingDatabase Management Systems
Here are three examples of returning rows that contain alphanumeric characters in SQL Server.
Alphanumeric characters are alphabetic and numeric characters.
Continue readingThe following example uses T-SQL to delete duplicate rows in SQL Server.
To be more specific, it deletes duplicate rows but keeps one. So if you have two identical rows, it deletes one of them and keeps the other. In other words, it de-dupes the table.
Continue readingMariaDB includes two selectors that enable us to select elements from JSON arrays:
[N]
selects element number N in the array (for example, [0]
to select the first element). [*]
selects all elements in the array.These can be used in a number of JSON functions that are included in MariaDB. The following examples use them with the JSON_EXTRACT()
function in order to return selected array elements.
Here are three options for returning rows that contain lowercase characters in MySQL.
Continue readingHere are two options for listing out the triggers in a PostgreSQL database.
Continue readingThe following PostgreSQL examples return only those rows that have numeric values in a given column.
Continue readingIf you use DBMSs such as MySQL or SQL Server, the syntax for inserting multiple rows into a table with a single statement is quite straightforward.
But if you use Oracle Database, you’ll need to use a different syntax.
Continue readingBelow are two methods for returning rows that only contain alphanumeric characters in PostgreSQL.
Alphanumeric characters are alphabetic characters and numeric characters.
Continue readingIf you get error Msg 4151 “The type of the first argument to NULLIF cannot be the NULL constant because the type of the first argument has to be known” in SQL Server, it’s because you’re passing a null value as the first argument to the NULLIF()
function.
To fix this error, make sure you do not pass the null constant as the first argument to the function. Or if you do, then convert it to a specific data type.
Continue readingIn SQLite, you can use the IF NOT EXISTS
clause of the CREATE TABLE
statement to check whether or not a table or view of the same name already exists in the database before creating it.
Creating a table without this clause would normally result in an error if a table of the same name already existed in the database. But when using the IF NOT EXISTS
clause, the statement has no effect if a table already exists with the same name.