In PostgreSQL, the GREATEST() function returns the greatest (or largest) value from a list of any number of expressions.
The GREATEST() function is not included in the SQL standard, but it’s a popular extension that many major RDBMSs support.
Here are some options for deleting duplicate rows from a table in Oracle Database when those rows have a primary key or unique identifier column.
In such cases, the primary key must be ignored when comparing duplicate rows (due to the fact that primary keys hold unique values).
Sometimes you might need to search a database table for only those rows that contain at least one number in a given column.
Technically, numbers can be represented by words and other symbols, but here “number” means “numerical digit”.
Below are examples of how to find rows that contain at least one number in various SQL based DBMSs.
In MariaDB, the NULLIF() function returns NULL if both of its arguments are equivalent. Otherwise it returns the first argument.
In PostgreSQL, we can use the to_timestamp() function to convert a Unix timestamp value to a date/time value.
The Unix timestamp (also known as Unix Epoch time, Unix time, or POSIX time) is the number of seconds that have elapsed since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC).
Here are four options for returning rows that contain uppercase characters in MariaDB.
Below are two options for returning rows that only contain non-alphanumeric characters in PostgreSQL.
Non-alphanumeric characters include punctuation characters like !@#&()–[{}]:;',?/* and symbols like `~$^+=<>“, as well as whitespace characters like the space or tab characters.