Counter of Festivals

Ashok Blog for SQL Learners and Beginners and Experts

Monday 27 April 2015

To See Last Identity Inserted Values and Newid() function usage.

To See Last Identity Inserted Values and Newid() function usage:

A)Output Inserted.Id or Output Inserted.ColumnName--------> It Gives Last Column Inserted Values.

B)scope_identity() ---------> It Gives Last Identity Values.

C)NEWID()-----------------> It Gives New Unique Identifier Values.

D)Is a system function that returns the last-inserted identity value.

E)NEWSEQUENTIALID ------>Creates a GUID that is greater than any GUID previously generated by this function on a specified computer since Windows was started. 

A)To Make Last Identity Operations:

http://sqltechi.blogspot.in/2014/07/output-clause-in-insertupdatedelete.html

B)To See Last Identity Values:



C) Newid()

Output:
ABED2614-EA86-4379-9877-B31EC91B754B

It varies and gives new Unique identity values every time u ran Statements.

D)@@identity



E)NEWSEQUENTIALID:




No comments:

Post a Comment