Friday, December 20, 2013

Use of Rowguid in Sql Server

Rowguid:-

  • To ensure global uniqueness for the purposes of replicating the table using merge replication.
  • Row Guid is designed for make a row id unique  across, tables ,databases, or even databases  over network computers. 
  • Although the IDENTITY property automates row numbering within one table, separate tables, each with its own identifier column, can generate the same values. This is because the IDENTITY property is guaranteed to be unique only for the table on which it is used. If an application must generate an identifier column that is unique across the database, or every database on every networked computer in the world, use the uniqueidentifier data type and the NEWID (Transact-SQL) or NEWSEQUENTIALID() function. The Database Engine does not automatically generate values for the column. To insert a globally unique value, create a DEFAULT definition on the column that uses the NEWID() or NEWSEQUENTIALID() function to generate a globally unique value.

How to Create rowguid column??



No comments:

Post a Comment