Du kan definiera kolumnen i din CREATE TABLE
som:
AgeInMinutes as (DATEDIFF(minute, PublishDate, GETDATE())
Alternativt gör du bara
ALTER TABLE Book
ADD AgeInMinutes as (DATEDIFF(minute, PublishDate, GETDATE())
Du kan definiera kolumnen i din CREATE TABLE
som:
AgeInMinutes as (DATEDIFF(minute, PublishDate, GETDATE())
Alternativt gör du bara
ALTER TABLE Book
ADD AgeInMinutes as (DATEDIFF(minute, PublishDate, GETDATE())