Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
NEWID

NEWID

SQL Server 2000

Creates a unique value of type uniqueidentifier.

Syntax
NEWID ( ) 
Return Types

uniqueidentifier

Examples

The following example returns a uniqueidentifier value that is inserted into a table using the NEWID function.

CREATE TABLE myTable(GuidCol uniqueidentifier, NumCol int)
INSERT INTO myTable Values(NEWID(), 4)
SELECT * FROM myTable

Show:
© 2015 Microsoft