Możesz zdefiniować kolumnę w swoim CREATE TABLE
jako:
AgeInMinutes as (DATEDIFF(minute, PublishDate, GETDATE())
Ewentualnie po prostu zrób
ALTER TABLE Book
ADD AgeInMinutes as (DATEDIFF(minute, PublishDate, GETDATE())
Możesz zdefiniować kolumnę w swoim CREATE TABLE
jako:
AgeInMinutes as (DATEDIFF(minute, PublishDate, GETDATE())
Ewentualnie po prostu zrób
ALTER TABLE Book
ADD AgeInMinutes as (DATEDIFF(minute, PublishDate, GETDATE())