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
Search our website
We also send out useful tips in a monthly email newsletter ...
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.
This blog is part of our SQL tutorial. Don't forget that Wise Owl are mainly a provider of SQL (and other) training courses. |
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 |
---|
|
Some other pages relevant to the above blogs include:
Kingsmoor House
Railway Street
GLOSSOP
SK13 2AA
Landmark Offices
99 Bishopsgate
LONDON
EC2M 3XD
Holiday Inn
25 Aytoun Street
MANCHESTER
M1 3AE
© Wise Owl Business Solutions Ltd 2023. All Rights Reserved.