USE /*your db name*/ IF EXISTS ( SELECT 1 FROM sys.tables WHERE name = 'TABLE_NAME_HERE' AND temporal_type = 2 ) BEGIN SELECT 'Yes' END ELSE BEGIN SELECT 'no' END GO