cja
cja

Reputation: 10036

How to replicate SQL Server rowversion behaviour for some fields only

SQL Server version 10.50.4000.

I have a table:

create table people
(
    national_id char(16),
    full_name char(255),
    last_visited datetime
)

I want to add a field that will work exactly like a rowversion field, except:

  1. It must update only when last_visited is changed.
  2. It needn't be unique on the database but must be unique on the table.

How can I do this?

Upvotes: 0

Views: 218

Answers (0)

Related Questions