Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Default values
How to auto-generate values in a database
14. Generating a GUID in the UPDATE statement
Summary

Instruction

Excellent! You can also use NEWID to update a record. Look at the query:

UPDATE Author
SET Id = NEWID()
WHERE FirstName = N'John' 
AND LastName = N'Williams';

This updates the Id field for John Williams with a new uniqueidentifier value.

Exercise

Generate a new Id value (of uniqueidentifier type) for the author whose LastName = N'Nowak'.