Du kan definere kolonnen i din CREATE TABLE
som:
AgeInMinutes as (DATEDIFF(minute, PublishDate, GETDATE())
Alternativt gør du bare
ALTER TABLE Book
ADD AgeInMinutes as (DATEDIFF(minute, PublishDate, GETDATE())
Du kan definere kolonnen i din CREATE TABLE
som:
AgeInMinutes as (DATEDIFF(minute, PublishDate, GETDATE())
Alternativt gør du bare
ALTER TABLE Book
ADD AgeInMinutes as (DATEDIFF(minute, PublishDate, GETDATE())