tsql get guid code example
Example 1: sql create new guid
-- Creating a local variable with DECLARE/SET syntax.
DECLARE @myid uniqueidentifier
SET @myid = NEWID()
PRINT 'Value of @myid is: '+ CONVERT(varchar(255), @myid)
Example 2: sql get guid
SELECT NEWID()