Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

variable in an IDENTITY function?

Status
Not open for further replies.

mercwrought

Programmer
Dec 2, 2004
176
US
Ok here is one for you
How do you use a variable in an IDENTITY function?
Example
Code:
declare @stuff int
set @stuff = (select min(somevalue) from sometable )

select idnumber as idnumber, amount as amount, IDENTITY(int,@stuff,1)
into thattable
from someothertable
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top