How to Get the Recovery Model of a Database in SQL Server using T-SQL

In SQL Server, a recovery model is a database property that controls how transactions are logged, whether the transaction log requires (and allows) backing up, and what kinds of restore operations are available. Databases can use one of the following three recovery models: simple, full, and bulk-logged.

You can query the sys.databases catalog view to get a list of databases and their recovery models.

Continue reading

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.

Continue reading