How to get Current Value from a SQL Server SEQUENCE

T-SQL:

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

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

sequence_current_value_tsql

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:

sequence_current_value_ssms_properties

Current Sequence value is shown:

sequence_current_value_ssms

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="">