TechNet
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize
The document is archived and information here might be outdated

NEWID (SQL Server Compact Edition)

Creates a unique value of type uniqueidentifier.


NEWID ( ) 

uniqueidentifier

The following example returns a uniqueidentifier value that is added to a table by using the NEWID function.

CREATE TABLE myTable(GuidCol uniqueidentifier, NumCol int)
INSERT INTO myTable Values(NEWID(), 4)
SELECT * FROM myTable
Show:
© 2016 Microsoft