Al's BrainDump

RSS

Navigation





Quick Search
»
Advanced Search »

PoweredBy
uniqueidentifier

Been around since sql7.

Massively long type - unique across dbs - possibly good for consolidating data from lots of diff sources. 16-byte binary value. This is an example of a formatted GUID: B85E62C3-DC56-40C0-852A-49F759AC68FB.

NEWID() function used to get the guid.

DECLARE @GUID uniqueidentifier
SET @GUID = NEWID()
INSERT Item VALUES (@GUID,'Yak Hoof')

ScrewTurn Wiki version 3.0.5.600. Some of the icons created by FamFamFam.