How to get Current Value from a SQL Server SEQUENCE


To get the current value from a SQL Server SEQUENCE, run the following code:

USE Database_Name
SELECT name, current_value FROM sys.sequences
WHERE name = 'Sequence_Name'


SQL Server Management Studio (SSMS):

To get the current value from a SQL Server SEQUENCE in SQL Server Management Studio (SSMS):

In SSMS Object Explorer expand Database name -> Programmability -> Sequences
Right click on the Sequence name and choose Properties:


Current Sequence value is shown:


If the post helped you, please share it:
Pin It

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">