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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Howto: Reset Record to Default Values?

Author  Topic 

nschoot
Starting Member

2 Posts

Posted - 2002-05-15 : 06:47:25
Hi all,

I have a table with an auto-increasing identity field, filled with a lot of records, new records are added continuously.

Some records need to be reset to their default values after some time. The normal way to do this would be to delete the record and recreate it, but this way the identity is lost. How do I reset a record to its default values without losing the identity??


marileng
Starting Member

28 Posts

Posted - 2002-05-15 : 06:59:54
Why use an identity when you have to edit the values?
Maybe you can post the DDL and sample date and output you would like to produce.

Go to Top of Page

dsdeming

479 Posts

Posted - 2002-05-15 : 08:06:31
According to BOL:

UPDATE
{
table_name WITH ( < table_hint_limited > [ ...n ] )
| view_name
| rowset_function_limited
}
SET
{ column_name = { expression | DEFAULT | NULL }

You should be able to 'SET column_name = DEFAULT'

Go to Top of Page
   

- Advertisement -