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 |
|
misterraj
Yak Posting Veteran
94 Posts |
Posted - 2005-03-11 : 01:47:27
|
| I have a tableCREATE TABLE [dbo].[Test] ( [name] [char] (40) _AS NULL , [inc] [int] IDENTITY (1, 1) NOT NULL ) ON [PRIMARY]This will have only one record at a time, each time I update this record, the value of inc must be inc+1, is that a way to achieve this in identity column. |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2005-03-11 : 06:00:43
|
| you've got a conflict here....The IDENTITY property is for situations where you have multiple records and you want/need a number that increases relative to the last record INSERTED.I'd advise removal of the IDENTITY property....and replacement with an UPDATE TRIGGER...search here for syntax/example of the latter. |
 |
|
|
|
|
|