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 |
|
tedew
Starting Member
22 Posts |
Posted - 2005-09-30 : 05:22:03
|
| hello,I have a porblem with Trigger which inserting numbers into ID Column.Something like autonumeric in Access .Is it posibble ??bye,sorry for my english |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-09-30 : 05:29:31
|
| In SQL Server you can set the Identity property to true when creating the table in Enterprise Manager or using this queryCreate table yourTable(id int identity,........)I think you dont need trigger for thisMadhivananFailing to plan is Planning to fail |
 |
|
|
tedew
Starting Member
22 Posts |
Posted - 2005-09-30 : 06:52:04
|
| hello,@madhivanan thanks for help :) it's working fine I have one more question, is it possible reset identity value ??bye. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-09-30 : 06:59:20
|
| If you dont want the data at all, then truncate it (All data will be deleted and identity reset)Truncate Table yourTableIf you want to keep all the existing records, thenDBCC CHECKIDENT (yourTable, RESEED, 0)MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|