Below are three ways to return time zone information from a datetime value in Oracle Database.
Set the Character Set and Collation of a Column in MariaDB
You can specify the character set and collation at various levels in MariaDB. You can specify them at the connection level, the server level, the database level, the table level, and even the column level.
You can also specify a collation in your queries so that it overrides any collation that has been previously specified at the aforementioned levels.
2 Ways to List all Functions in MySQL
Below are two options we can use to return a list of functions in MySQL.
How to Check a Column’s Data Type in SQL
In SQL, the columns information schema view, which returns information about columns, is an ISO standard view that is supported by most of the major RDBMSs. You can use this view to get information about a column’s data type.
Most of the major RDBMs also provide other methods for getting column information.
Here are examples of getting the data type of a column in various SQL databases.
SCHEMA() Function in MySQL
In MySQL, the SCHEMA() function is a synonym for the DATABASE() function. It returns the default (current) database name.
The result is returned as a string in the utf8 character set. If there is no default database, it returns NULL.
2 Ways to Find Out Which Quarter a Date Belongs to in MariaDB
If you ever need to find out which quarter a date belongs to in MariaDB, here are two functions that will allow you to do just that.
Fix Msg 8117 “Operand data type varchar is invalid for sum operator” in SQL Server
If you’re getting SQL Server error Msg 8117 with the message Operand data type varchar is invalid for sum operator, it’s because you’re passing the wrong data type to an operator or function.
In this case, the error indicates that we’re passing a string to the SUM() function. The SUM() function does not operate on strings. It only works on numeric types.
The same error (Msg 8117) can also occur in other contexts – it’s not limited to the SUM() function.