Here are three ways to get the data type of a given column in MariaDB.
Continue readingTag: data types
Data Type Precedence in SQL Server
Below is a list containing the SQL Server data types, in order of precedence.
Continue reading3 Ways to Check Column Data Type in Oracle
Here are three ways to get information about a table’s columns in Oracle, including their data types.
Continue reading4 Ways to Check a Column’s Data Type in MySQL
Here are four ways to get the data type of a column in MySQL.
Continue reading3 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.
Continue readingRename a User Defined Data Type in SQL Server (T-SQL)
In SQL Server, you can use the sp_rename
stored procedure to rename a user created object in the current database, including a user-defined data type.
Find Out the Data Type of the Columns Returned in a Result Set in SQL Server
In SQL Server, there are a few ways to get metadata of the result set from a query. This includes the data type of the columns returned by a T-SQL query.
In particular, the sys.dm_exec_describe_first_result_set
system dynamic management function is a good choice for such a task.
MongoDB $isNumber
From MongoDB 4.4, you can use the $isNumber
aggregation pipeline operator to check whether or not a value is a number.
It accepts any valid expression, and returns true
if the expression is a number, false
if it’s not.
MongoDB $type Query Operator
In MongoDB, you can use the $type
element query operator to filter a collection of documents based on BSON type. It returns just those documents that have a particular BSON type in a specific field.
You provide the field and the BSON type, and $type
will return all documents that match.
MongoDB $type Aggregation Pipeline Operator
In MongoDB, the $type
aggregation pipeline operator returns the BSON type of its argument.
You can use it to find out the type of a given field.
Continue reading