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 |
|
waterduck
Aged Yak Warrior
982 Posts |
Posted - 2009-09-11 : 22:50:03
|
[code]DECLARE @tempfun TABLE(col1 int identity(1,1) not null, col2 int)INSERT INTO @tempfun SELECT9 UNION ALL SELECT8 UNION ALL SELECT7 DELETE FROM @tempfun WHERE col1 = 3INSERT INTO @tempfun SELECT 6SELECT * FROM @tempfun[/code]hi guys, we know that identity field will keep on accumulate but after we delete 1 row of data, how do we get the next identity value is what?i means how to get the next identity value from a select statement?? Hope can help...but advise to wait pros with confirmation... |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
waterduck
Aged Yak Warrior
982 Posts |
Posted - 2009-09-15 : 11:07:37
|
sorry tara....haven wrong logic thinking that time... Hope can help...but advise to wait pros with confirmation... |
 |
|
|
|
|
|