Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

SQL Server 2008 R2 Data Types Expand / Collapse
Author
Message
Posted Wednesday, February 22, 2012 12:01 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Yesterday @ 2:22 PM
Points: 3,466, Visits: 1,819
Comments posted to this topic are about the item SQL Server 2008 R2 Data Types

Kenneth Fisher
I strive to live in a world where a chicken can cross the road without being questioned about its motives.
--------------------------------------------------------------------------------
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

Link to my Blog Post --> www.SQLStudies.com
Post #1255721
Posted Wednesday, February 22, 2012 6:12 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Monday, August 6, 2012 9:24 AM
Points: 54, Visits: 17
Good information. You forgot to mention the time component of the Datetime data type (00:00:00 through 23:59:59.997). Otherwise, thanks for sharing!
Post #1255881
Posted Wednesday, February 22, 2012 6:59 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Monday, December 2, 2013 6:30 AM
Points: 346, Visits: 691
Very, very helpful. Maybe Microsoft should have a set of tables like this one at the front of the BOL! :)
Post #1255926
Posted Wednesday, February 22, 2012 7:28 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Friday, August 1, 2014 9:53 AM
Points: 63, Visits: 177
Nice work, thank you!
Post #1255959
Posted Wednesday, February 22, 2012 7:48 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, October 17, 2014 1:59 PM
Points: 262, Visits: 918
"A column of type sql_variant may contain rows of different data types."

fwiw: I parse that sentence at least two ways. I believe the correct meaning is that the field value on any particular row may contain a different data type than some other row.

It might also be taken as: the sql_variant type is something similar to an array that could contain rows of data. I'm sure there are a few programmers out there who would like to store a complex object like an array in a single row.

My assumption is that most DBA here simply avoid this type. I'm curious to know how/why this type is being used in the real world - and whether it can be indexed.
Post #1255990
Posted Wednesday, February 22, 2012 8:23 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Today @ 8:29 AM
Points: 5, Visits: 335
Very helpful! Thanks Kenneth. One minor spelling correction - "spacial" should be "spatial".
Post #1256036
Posted Wednesday, February 22, 2012 10:46 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Yesterday @ 2:22 PM
Points: 3,466, Visits: 1,819
Thanks for all of the great comments. I'm working on having the one spelling error corrected. I should also point out (if anyone didn't already notice) that the data type names have links to the BOL article about that particular data type.

I'll probably end up doing one of these for 2012 and I'll make sure to add in all of the corrections mentioned here.

Thanks
Kenneth


Kenneth Fisher
I strive to live in a world where a chicken can cross the road without being questioned about its motives.
--------------------------------------------------------------------------------
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

Link to my Blog Post --> www.SQLStudies.com
Post #1256150
Posted Wednesday, February 22, 2012 5:31 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, February 17, 2014 9:44 AM
Points: 127, Visits: 105
Thanks for sharing this info Kenneth...
Post #1256355
Posted Thursday, February 23, 2012 3:46 PM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Thursday, October 2, 2014 6:39 PM
Points: 496, Visits: 1,123
Thanks! Very helpful. I made myself a Word version. It's attached if anyone wants it.

Looking for a Deadlock Victim Support Group..
Post #1256981
Posted Friday, February 24, 2012 9:39 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Thursday, October 16, 2014 11:48 AM
Points: 3,958, Visits: 3,644
Very nice. Thanks for sharing this.
Post #1257511
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse