SQL Variant

SQL Variant
 Its data type that stores values of various SQL Server-supported data types.
 In certain conditions where we are not sure about datatype we can define it as sql_variant for testing purpose.

 Its supporting int,char and binary value but will not support char(max)/varchar(max)/nvarchar(max) .


This proc assigns range of sequence values  to current application along with metadata.

Functions to get identity value

There are 3 functions to get current identity value


Returns last identity value generated by last statement  in current session for all scopes
If statement fires trigger and identity value generated by that trigger than @@identity
will give value generated by that trigger

How to use sequence

What is sequence , we saw it in previous article
Now we will use it practically to understand how it works

First we will create a sequence

Popular Posts