如何在uniqueidentifier领域实现RESEED概念 [英] How to achieve RESEED concept on uniqueidentifier field

查看:90
本文介绍了如何在uniqueidentifier领域实现RESEED概念的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi,

We have the tables in the below two formats. As per my business requirement,  I need to reseed table Id to 3 times of the current/maximum Id value using RESEED concept. I can achieve this for table1 but not for table2.



表-1:


Table-1:

CREATE TABLE Client
{
clientId int IDENTITY(1,1) NOT NULL,
Name VARCHAR(100)
}



表-2:


Table-2:

CREATE TABLE Nomination
{
NominationId UniqueIdentifier NOT NULL,
NominationName VARCHAR(100)
}





我尝试了什么:



我试图在表-2上应用重新设定的概念,但它没有用。



What I have tried:

I have tried to apply the reseed concept on table-2 but its not worked.

Is there any way to reserve Ids in three times of the current max Id for table2 without altering the current table structure from UniqueIdentifier  to identity field.





谢谢,

Sindhu



Thanks,
Sindhu

推荐答案

RESEED 仅适用于 IDENTITY 列。



根据您发布的代码,表2 没有 IDENTITY 列。因此,您不能对该表使用 RESEED
RESEED only applies to IDENTITY columns.

Based on the code you've posted, table 2 does not have an IDENTITY column. Therefore, you cannot use RESEED with that table.


这篇关于如何在uniqueidentifier领域实现RESEED概念的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆