Tag Archives: data types
-
Conversion Precedence
1September 20, 2022 by Kenneth Fisher
Recently I talked about the difference between implicit and explicit datatype conversions. In it I ran this code: With the …
Continue reading -
Explicit and implicit datatype conversions
2August 25, 2022 by Kenneth Fisher
Did you know that 1/2=0? If you didn’t you could be in for some interesting surprises. 1/2 returns 0 because …
Continue reading -
The sysname datatype defaults to not NULL.
4August 26, 2021 by Kenneth Fisher
The other day I was creating a table to store some metadata. Since the metadata I was collecting (sys.databases.name for …
Continue reading -
Right sizing int : T-SQL Tuesday #136
4March 9, 2021 by Kenneth Fisher
Brent Ozar (blog|twitter) is our host this month, which will make this the most popular #tsql2sday to date I’m sure. …
Continue reading -
What is the datatype SQL_VARIANT
3April 16, 2020 by Kenneth Fisher
The SQL_VARIANT data type is an interesting beast. It is a data type that can store most types of data. …
Continue reading -
CREATE TABLE MyTable (Col1 CHARACTER VARYING (50))
Leave a commentJanuary 27, 2020 by Kenneth Fisher
If you read the title to this post and your first thought was That’s not SQL is it? then you …
Continue reading -
SQL Homework – July 2019 – Table Size
Leave a commentJuly 1, 2019 by Kenneth Fisher
In general this homework series is meant to give you ideas of things to play with that most if not …
Continue reading -
Data Types Word Search
4September 26, 2018 by Kenneth Fisher
Just for fun here is a word search with all of the data types available in SQL Server. Well, two …
Continue reading -
Using LEN wrong.
4June 2, 2016 by Kenneth Fisher
I was reading someone’s question the other day on StackExchange and while the existing comments/questions solved the OP’s (original poster) …
Continue reading -
varchar(1) VS char(1)
5February 15, 2016 by Kenneth Fisher
The other day I made a somewhat flip coment on twitter. (I know, everyone is shocked right?) varchar(1) Really? It’s …
Continue reading