Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

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
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.