Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
SQLServerDBA_Dan
Aged Yak Warrior
752 Posts |
Posted - 2005-08-25 : 11:55:39
|
| Maybe I'm blind but I can't seem to find any documentation that says specifically what a uniqueidentifier data type is stored in the database as.INT = 4 bytesBIGINT = 8 bytesSMALLINT = 2 bytesDATETIME = 8 bytes (2x4INT)UNIQUEIDENTIFIER = ?Thanks,Daniel |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-08-25 : 12:26:26
|
SELECT LEN(CAST(NewID() as varbinary(1000))) Kristen |
 |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2005-08-25 : 13:30:43
|
| It's stored internally in a 16 byte column.Think of it as a really big integer that you can't do any math operations with.CODO ERGO SUM |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-08-26 : 02:07:18
|
| >>SELECT LEN(CAST(NewID() as varbinary(1000)))Kris, Any reason you used 1000It seems to work for any number greater than 15MadhivananFailing to plan is Planning to fail |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-08-26 : 02:27:35
|
| Just to make sure it was "big enough"Kristen |
 |
|
|
|
|
|