Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
erics44
Starting Member
12 Posts |
Posted - 2009-12-08 : 06:36:09
|
| HiIf I insert 10 rows to a table do you know how i return the first identity number of these 10 rowsi know scope_identity() returns the lastThanks in advance |
|
|
rajdaksha
Aged Yak Warrior
595 Posts |
Posted - 2009-12-08 : 07:21:28
|
| hiYou expect this..?SELECT IDENT_SEED('tablename')SELECT IDENT_INCR('tablename')-------------------------R... |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-12-08 : 07:34:41
|
| Immediately after the insertion, SELECT SCOPE_IDENTITY()-@@ROWCOUNT*IDENT_INCR('your_table')MadhivananFailing to plan is Planning to fail |
 |
|
|
erics44
Starting Member
12 Posts |
Posted - 2009-12-08 : 07:42:15
|
| thanks |
 |
|
|
|
|
|