Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

INSERT identity

 
   Database Help (Home) -> Programming RSS
Next:  Pivot Columns  
Author Message
David Chase

External


Since: Apr 17, 2007
Posts: 2



(Msg. 1) Posted: Wed Jun 18, 2008 2:53 pm
Post subject: INSERT identity
Archived from groups: microsoft>public>sqlserver>programming (more info?)

If I issue a command to insert a record with ALLOW IDENTITY INSERT will I
have to reset the current IDENTITY column? Thanks.

David

 >> Stay informed about: INSERT identity 
Back to top
Login to vote
Jagged

External


Since: Jun 04, 2008
Posts: 3



(Msg. 2) Posted: Wed Jun 18, 2008 2:53 pm
Post subject: Re: INSERT identity [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Jun 18, 3:53 pm, "David Chase" wrote:
> If I issue a command to insert a record with ALLOW IDENTITY INSERT will I
> have to reset the current IDENTITY column?  Thanks.
>
> David

if allow identity insert and your table is as follows:

ID Desc
========
1 aaa
2 bbb
3 ccc

...and you insert values(5,'ddd'). when you turn identity insert off,
the next available ID will 6.

 >> Stay informed about: INSERT identity 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Next Id without Identity - I'm getting a duplicate key problem with this code. I can't use a Identity column. BEGIN TRANSACTION INSERT INTO T1 (Id1, Id2, OrderNo, Data) SELECT @Id1_p, @Id2_p, ISNULL(max(OrderNo),0) + 1, @Data FROM T1 WHERE Id1 = @Id1_p AND Id2 ...

Identity Column - Is it possible to set the indentitiy flag for a column by simply using alter table/alter column in SQL 2000 and SQL 2005.

How to find next identity - Hi All, Is there any way to know the next identity number the server would probably assign for the identity column? I'm having a table say Student with an identity column as StudentId. How to find the next Id value the system would assign for a new..

Question about IDENTITY columns. - We have a atble TAB1[ ID IDENTITY integer, NAME VARCHAR[30], .... ]. This table is present in 2 databases Db1 and Db2. We want to keep them both in sync daily. The mapping of Name -> ID should be the same in both the tables. We allow only Db1 tables t...

Identity/Seed Values - I have a question regarding using the Identity/Seed values. I have migrated a number of tables form Access to SQL. In Access the identity/seed values were called autonumbers. The big problem with autonumbers in Access was that they could change at any...
   Database Help (Home) -> Programming All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]