---
title: "SQL Server is Missing NextVal Functionality"
url: "https://osherove.com/blog/2003/6/18/sql-server-is-missing-nextval-functionality.md"
canonical: "https://osherove.com/blog/2003/6/18/sql-server-is-missing-nextval-functionality.html"
published: "2003-06-18T10:31:00"
updated: "2003-06-18T10:31:00"
tags: ["Off Topic"]
author: "Roy Osherove"
description: "I really like working with SQL server, but there is one feature that's missing that I can;t understand why: Sequences. In ORACLE, I could do a \"Table.NextVal\" to get the value of the next insert unique ID. In SQL Server…"
usage: "Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page)."
license: "https://creativecommons.org/licenses/by/4.0/"
---

# SQL Server is Missing NextVal Functionality

By Roy Osherove June 18, 2003 In [Off Topic](https://osherove.com/blog/category/off-topic)

**Historical article** · Originally published June 18, 2003; technical details may be outdated.

I really like working with SQL server, but there is one feature that's missing that I can;t understand why: Sequences.

-    In ORACLE, I could do a "Table.NextVal" to get the value of the next insert unique ID.
- In SQL Server - I have nothing but @@IDENTITY to go with, but I can only get the Current IDENTITY. This is causing some of our stuff some real trouble.

Anyone know if there's a way to implement **NextVal** functionality in SQL server? we've been fighting with this all day.... :(

Is there something we're missing here?

## More in Off Topic

[All posts in Off Topic](https://osherove.com/blog/category/off-topic)

- Jun 23, 2003

    ### [Stop The Silliness](https://osherove.com/blog/2003/6/23/stop-the-silliness.html)

- Jun 19, 2003

    ### [Book Gripes, Safari Bookshelf, And a .Net Desktops Prize](https://osherove.com/blog/2003/6/19/book-gripes-safari-bookshelf-and-a-net-desktops-prize.html)

- Jun 18, 2003

    ### [About Interfaces](https://osherove.com/blog/2003/6/18/about-interfaces.html)

- Jun 17, 2003

    ### [ABEK](https://osherove.com/blog/2003/6/17/abek.html)


---

## About the author

**Roy Osherove**: Senior Solutions Architect at AWS working on AI for production and AI-driven development; author of The Art of Unit Testing and Elastic Leadership, with about 20 years of consulting and training on unit testing, TDD, team leadership and continuous delivery.

### Sites

- [RobotPaper](https://robotpaper.ai/): This blog: AI patterns and anti-patterns, AI and coding agents, and engineering leadership.
- [osherove.com](https://osherove.com): Roy's personal site. Author of The Art of Unit Testing and Elastic Leadership; consulting and training on unit testing, TDD, team leadership and continuous delivery, plus about 20 years of blog posts.
- [The Art of Unit Testing](https://www.artofunittesting.com): The Art of Unit Testing, 3rd Edition (Manning): readable, maintainable, trustworthy unit tests, plus TDD workshops in C#, JavaScript, Java and Kotlin.
- [5whys.com](https://www.5whys.com): Roy's writing on software team leadership: self-organizing teams, surviving chaos, learning mode and the Elastic Leadership model.
- [Pipeline Driven](https://pipelinedriven.org): Continuous delivery and DevOps practices: build patterns, pipeline-friendly testing, DevOps metrics and enterprise DevOps.
- [Elastic Leadership](https://www.elasticleadership.com): Elastic Leadership, Roy's framework for software team leaders (survival, learning and self-organizing modes).

### Social

- X: https://x.com/royosherove
- LinkedIn: https://www.linkedin.com/in/osherove/

### Contact

- Contact form: https://forms.gle/jQSx5KoXvrVA1JCK7

### License

Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page). License: https://creativecommons.org/licenses/by/4.0/
