2
Reply

How to access the current value and next value from a sequence? Is it possible to access the current value in a session before accessing next value?

Gaurav Malviya

Gaurav Malviya

10y
1.1k
0
Reply

    SELECT NEXT VALUE FOR [SequenceName] for accessing Next VALUE of Sequence.We can view Current value of Sequence by right clicking on Sequnece name in Programmability-->Sequence-->[SeuquenceName] in SSMS 2012 or later.

    Sequence name CURRVAL, sequence name NEXTVAL. It is not possible. Only if you access next value in the session, current value can be accessed.