In MariaDB, we can use the IF EXISTS clause of the DROP TABLE statement to check whether the table exists or not before dropping it.
how to
3 Ways to List all Stored Procedures in a PostgreSQL Database
Here are three options for listing out all the stored procedures in a Postgres database.
Fix “Arithmetic overflow error converting int to data type numeric” in SQL Server
If you’re receiving error Msg 8115, Level 16, Arithmetic overflow error converting int to data type numeric in SQL Server, it’s probably because you’re performing an operation that results in a data conversion error due to an out of range value.
This will often happen when you try to convert a number to a different data type, but it’s out of the accepted range for the new data type.
Fix “Arithmetic overflow error converting expression to data type int” in SQL Server
If you’re receiving error Msg 8115, Level 16, Arithmetic overflow error converting expression to data type int in SQL Server, it could be that you’re performing a calculation that results in an out of range value.
This can happen when you use a function such as SUM() on a column, and the calculation results in a value that’s outside the range of the column’s type.
Fix “Arithmetic overflow error converting IDENTITY to data type…” in SQL Server
If you’re getting error “Msg 8115, Level 16 Arithmetic overflow error converting IDENTITY to data type…” error in SQL Server, it’s probably because you’re trying to insert data into a table when its IDENTITY column has reached its data type’s limit.
An IDENTITY column automatically increments the value that’s inserted with each new row. If the value being inserted is out of the range of the column’s data type, then the above error will occur.
3 Ways to Get a Column’s Data Type in SQL Server (T-SQL)
GUIs like SSMS or Azure Data Studio make it easy to see a column’s data type. Usually it’s a simple matter of navigating to the column in the object explorer and you can see the data type right next to the column.
But if you’re using T-SQL, you’ll need to run a query.
How to Change the Locale When Formatting Numbers in PostgreSQL
If you’re formatting a number in PostgreSQL, and you want to change the locale so that the correct group and decimal separators are used, here’s how you can do that.
Oracle DROP TABLE IF EXISTS Alternatives
The very useful DROP TABLE IF EXISTS syntax was finally introduced in Oracle Database – Oracle Database 23c to be precise. This syntax allows us to run a DROP TABLE statement without getting an error if the table doesn’t exist.
Earlier versions of Oracle don’t support the IF EXISTS clause. Therefore, if we want to avoid any nasty errors resulting from trying to drop a non-existent table, we need to do a bit of extra work.
Below are three options for dropping a table if it exists in Oracle.