Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Reset Identity Field

2 posts in General Discussion Last posting was on 2010-08-06 22:14:03.0Z
RGS Posted on 2010-08-06 20:36:34.0Z
Sender: 5418.4c5c7188.1804289383@sybase.com
From: RGS
Newsgroups: sybase.public.ase.general
Subject: Reset Identity Field
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4c5c7252.5426.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 6 Aug 2010 13:36:34 -0700
X-Trace: forums-1-dub 1281126994 10.22.241.41 (6 Aug 2010 13:36:34 -0700)
X-Original-Trace: 6 Aug 2010 13:36:34 -0700, 10.22.241.41
Lines: 10
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:29456
Article PK: 78690

Hi!

I need to reset the value of a identity field

I tested by executing "truncate table" command but it didn't
work, the identity field didn't return to 1 value

I am using ASE 15.5

Thanks a lot!!


Bret Halford Posted on 2010-08-06 22:14:03.0Z
From: Bret Halford <bret@sybase.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11) Gecko/20100711 Thunderbird/3.0.6
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: Reset Identity Field
References: <4c5c7252.5426.1681692777@sybase.com>
In-Reply-To: <4c5c7252.5426.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4c5c892b$1@forums-1-dub>
Date: 6 Aug 2010 15:14:03 -0700
X-Trace: forums-1-dub 1281132843 10.22.241.152 (6 Aug 2010 15:14:03 -0700)
X-Original-Trace: 6 Aug 2010 15:14:03 -0700, vip152.sybase.com
Lines: 16
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:29457
Article PK: 78689


On 8/6/2010 2:36 PM, RGS wrote:
> Hi!
>
> I need to reset the value of a identity field
>
> I tested by executing "truncate table" command but it didn't
> work, the identity field didn't return to 1 value
>
> I am using ASE 15.5
>
> Thanks a lot!!

Use the "identity_burn_max" option to sp_chgattribute.

-bret