Here are two ways you can use SQLcl or SQL*Plus to check your Oracle Database compatibility level.
Continue readingCategory: DBMS
Database Management Systems
Fix MySQL Warning 1287: ‘BINARY expr’ is deprecated and will be removed in a future release
If you get warning number 1287 that reads ‘BINARY expr’ is deprecated and will be removed in a future release. Please use CAST instead when running a query in MySQL, it’s because you’re using the BINARY
operator.
The BINARY
operator is deprecated as of MySQL 8.0.27.
To fix the issue, cast the value to binary using the CAST()
function instead.
5 Ways to Return Rows that Contain Lowercase Letters in SQL Server
If you need to find rows that contain lowercase letters in SQL Server, you could try one of the following options.
Continue readingHow to Show the Current Setting for Null Output in PostgreSQL (psql)
When using psql, null values are returned as an empty string by default.
This can easily be changed with the \pset
command, so it could be a value other than the default empty string.
If you’re not sure what your current value is, you can use the show \pset null
command to show the current value.
Formatting Numbers with Commas in MariaDB
In MariaDB, we can use the FORMAT()
function to format a number with commas.
More specifically, the function returns the number as a formatted string, with thousands separators and a decimal separator, and rounded to the given decimal position.
Continue readingFix Msg 241 “Conversion failed when converting date and/or time from character string” in SQL Server
If you’re getting SQL Server error Msg 241 that reads Conversion failed when converting date and/or time from character string, it’s probably because you’re trying to convert a string to a date/time value, but that particular string can’t be converted to the date/time type specified.
Continue reading2 Ways to Create a Table if it Doesn’t Exist in SQL Server
T-SQL doesn’t include the IF NOT EXISTS
clause with its CREATE TABLE
statement, like some other DBMSs do.
Therefore, if we want to check for the existence of the table before we create it in SQL Server, we need to use other methods.
Continue readingFind Values That Don’t Contain Numbers in SQLite
The following example returns all rows that don’t contain any numbers in SQLite.
By “number” I mean “numerical digit”. Numbers can also be represented by words and other symbols, but for the purpose of this article, we’re returning values that don’t contain any numerical digits.
Continue readingHow to Subtract a Day from a Date in MariaDB
MariaDB provides several ways to perform arithmetic on dates. This includes adding or subtracting a day (or many days) from a given date.
Here’s an example of subtracting a day from a date in MariaDB.
Continue readingList All Functions in Oracle Database
Here are several ways to get a list of functions in Oracle Database.
Continue reading