I am not sure what is happening. It should not insert a value of 101 if 
your max is 10. Say I have a table that only has 7 rows because I 
deleted 3 and my max is ten, when I insert it should give me 11. I 
always hated identity fields, that is why I do not use them.


There are two major products that come out of Berkeley: LSD and [Unix] 
BSD. We don't believe this to be a coincidence.



Doug Brown
----- Original Message ----- 
From: "Waldemiro Junior" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, January 10, 2002 5:27 AM
Subject: SQL Help


> Hi Folks.
> 
> How can I know the next value to be inserted in an Identity field data 

> type (MS SQL Server)?
> When I put this query: "SELECT MAX(COD_REQ) FROM TAUX_001" it returns 
> the value 10, which corresponds correctly to what its recorded on the 
> table, but when I insert something in it, after making a select, it 
> returns the value 101, cause I have already deleted 90 records from 
this 
> table.
> If I didn�t make myself clear, please let me know.
> 
> Thanks and best regards.
> 
> Waldemiro Junior
> ADD Technologies Web Developer
> 
> 
______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to