SQL Server 2016 has a view sys.time_zone_info
. In my table I store the Time Zone Name (from that view). Now, I cannot (apparently) simply define a FK from my table's column to that view:
ALTER TABLE [dbo].[MyTable]
ADD CONSTRAINT [TimeZone_Name_FK]
FOREIGN KEY ([TimeZone_Name]) REFERENCES sys.time_zone_info([Name])
I would like to ensure that the data in my table is validated against that view. How would you suggest I handle this? A trigger seems to be overkill.
Thanks.