0

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?

cja
  • 9,512
  • 21
  • 75
  • 129
  • 1
    Are you sure you want to work "exactly" as a rowversion field? rowversions are unique on the database. Do you need that uniqueness? – Jesús López Feb 25 '16 at 11:36
  • @JesúsLópez Thanks for question. It must be unique on the table. Doesn't have to be unique on the database. – cja Feb 25 '16 at 11:37

0 Answers0