SQL Server @@Identity vs Scope_Identity vs Ident_Current Tamil

Ғылым және технология

Click here to Subscribe to IT PORT Channel : / @itport28
Identity is a Column Property. This Property is used with CREATE TABLE and ALTER TABLE Transact SQL Statements.
When you insert a new record into your table, this field automatically assign an incremented value from the previous entry. Usually, you can't insert your own value to this field.
You must specify both the seed and increment or neither. If neither is specified, the default is (1,1).
We Can Get the Inserted Identity value by using these three Functions.
@@IDENTITY
SCOPE_IDENTITY
IDENT_CURRENT
In this Video you can check these functions with Simple Example

Пікірлер

    Келесі