如何在sql server中跳过AutoId? [英] How to Skip AutoId in sql server?
问题描述
Hello Everybody,
如何在sql server中跳过自动递增的id
例如,
Id Name
=====================
1 John
2 Mark
3凯文
4彼得
6乔
如果输入数字是2那么我想跳过那些相关的ID和结果应该是这样的
Id Name
=============== =======
1 John
3 Kevin
6 Joe
谢谢你
Hello Everybody,
How to Skip auto incremented id in sql server
For Example,
Id Name
=====================
1 John
2 Mark
3 Kevin
4 Peter
6 Joe
If the input is number 2 then i want to skip those related ids and result should be like this
Id Name
======================
1 John
3 Kevin
6 Joe
THANK YOU
推荐答案
我解决了我使用while循环
这篇关于如何在sql server中跳过AutoId?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!