557 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owls only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
T-SQL data types - int, float, decimal, varchar, etc.
Part one of a six-part series of blogs
Whether you're creating tables in SQL Server, using SQL variables or passing parameters to stored procedures, you'll need to understand what the possible data types that you can use are.
Whether you're creating tables, passing data to stored procedures or working with variables, you'll need to know what sorts of data SQL Server can work with.
You'll also need to know how to convert between data types, and this is covered at the end of this blog.
If you want a quick reference, you can't go far wrong with choosing between these data types (the rest of this blogs gives the full Monty on what's going on):
|What you're storing||Use||Notes|
|Any string of text||varchar(MAX)||The string of text does have a theoretical maximum limit of 2,147,483,647 characters. That's a LOT of text!|
|Any whole number||int||Again, this has a theoretical maximum value of 2,147,483,647. This is a large number.|
|Any other number||float||This can hold virtuallly any number you can conceive of, from the tiniest fraction to the number of atoms in the Universe.|
|Any date||date||Holds any date between 1st January in 1AD to 31st December 9999!|
|Any logical (yes/no) value||bit||A bit is either on or off (0 corresponds to False, and 1 to True).|
|A calculation||N/A||Computed columns are covered in this separate blog.|
For those who want to know more than this, the rest of this blog gives a fuller picture (it's still not the whole story though).
|Parts of this blog|
25 Aytoun Street