MariaDB provides multiple ways of returning the data type of a column. Here are four ways to get the data type of a given column in MariaDB.
Continue readingAuthor: Ian
Fix Msg 8114 “Error converting data type varchar to numeric” in SQL Server
If you’re getting SQL Server error Msg 8114 that reads something like Error converting data type varchar to numeric, it’s probably because you’re trying to perform a data type conversion that fails due to the value not being able to be converted to the destination type.
It’s not because you can’t convert that type to the new type. It’s because of the value itself.
Continue readingHow TRY_CAST() Works in SQL Server
In SQL Server, an often used function is CAST()
, which converts an expression of one data type to another. But if the cast doesn’t succeed, then it returns an error.
Enter TRY_CAST()
.
The TRY_CAST()
function doesn’t return an error if the cast fails. Instead, it returns NULL
.
There are some occasions however, where it will return an error.
Continue readingHow TRY_CONVERT() Works in SQL Server
In SQL Server, the TRY_CONVERT()
function is very similar to the CONVERT()
function, except that TRY_CONVERT()
doesn’t return an error if the conversion fails (CONVERT()
does).
Instead, the TRY_CONVERT()
function returns NULL
if the conversion doesn’t succeed.
There are some occasions however, where TRY_CONVERT()
will return an error.
5 Ways to Check a Column’s Data Type in SQLite
In SQLite, there are quite a few ways to look at a table’s structure. Therefore, there are quite a few ways we can check the data type of the columns within that table.
There’s also a function that allows us to check the data type of a column returned in a query.
Here are five ways to check the data type of a column in SQLite.
Continue readingSubtract Seconds from a Datetime Value in MariaDB
Here are some options for subtracting one or more seconds from a datetime expression in MariaDB.
Continue readingCONVERT() in SQL Server
In SQL Server, the CONVERT()
function converts an expression of one data type to another.
Here’s a quick overview of the function with examples.
Continue reading3 Ways to Check a Column’s Data Type in PostgreSQL
Here are three ways to get the data type of a given column in MariaDB.
Continue readingHow CAST() Works in SQL Server
In SQL Server, the CAST()
function converts an expression of one data type to another.
Here’s a quick overview of the function with examples.
Continue readingData Type Precedence in SQL Server
Below is a list containing the SQL Server data types, in order of precedence.
Continue reading