Tables [Tzdb].[Intervals]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
HeapYes
Row Count (~)22887
Created7:27:45 PM Tuesday, June 11, 2024
Last Modified7:27:57 PM Tuesday, June 11, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Primary Key PK_Intervals: IdIdint4
No
1 - 1
Foreign Keys FK_Intervals_Zones: [Tzdb].[Zones].ZoneIdIndexes IX_Intervals_Local: OffsetMinutes\Abbreviation\ZoneId\LocalStart\LocalEnd\UtcStartIndexes IX_Intervals_Utc: OffsetMinutes\Abbreviation\ZoneId\UtcStart\UtcEndZoneIdint4
No
Indexes IX_Intervals_Local: OffsetMinutes\Abbreviation\ZoneId\LocalStart\LocalEnd\UtcStartIndexes IX_Intervals_Utc: OffsetMinutes\Abbreviation\ZoneId\UtcStart\UtcEndUtcStartdatetime2(0)6
No
Indexes IX_Intervals_Utc: OffsetMinutes\Abbreviation\ZoneId\UtcStart\UtcEndUtcEnddatetime2(0)6
No
Indexes IX_Intervals_Local: OffsetMinutes\Abbreviation\ZoneId\LocalStart\LocalEnd\UtcStartLocalStartdatetime2(0)6
No
Indexes IX_Intervals_Local: OffsetMinutes\Abbreviation\ZoneId\LocalStart\LocalEnd\UtcStartLocalEnddatetime2(0)6
No
Indexes IX_Intervals_Local: OffsetMinutes\Abbreviation\ZoneId\LocalStart\LocalEnd\UtcStartIndexes IX_Intervals_Utc: OffsetMinutes\Abbreviation\ZoneId\UtcStart\UtcEndOffsetMinutessmallint2
No
Indexes IX_Intervals_Local: OffsetMinutes\Abbreviation\ZoneId\LocalStart\LocalEnd\UtcStartIndexes IX_Intervals_Utc: OffsetMinutes\Abbreviation\ZoneId\UtcStart\UtcEndAbbreviationvarchar(10)10
No
Indexes Indexes
NameColumnsUnique
Primary Key PK_Intervals: IdPK_IntervalsId
Yes
IX_Intervals_LocalOffsetMinutes, Abbreviation, ZoneId, LocalStart, LocalEnd, UtcStart
IX_Intervals_UtcOffsetMinutes, Abbreviation, ZoneId, UtcStart, UtcEnd
Foreign Keys Foreign Keys
NameColumns
FK_Intervals_ZonesZoneId->[Tzdb].[Zones].[Id]
SQL Script
CREATE TABLE [Tzdb].[Intervals]
(
[Id] [int] NOT NULL IDENTITY(1, 1),
[ZoneId] [int] NOT NULL,
[UtcStart] [datetime2] (0) NOT NULL,
[UtcEnd] [datetime2] (0) NOT NULL,
[LocalStart] [datetime2] (0) NOT NULL,
[LocalEnd] [datetime2] (0) NOT NULL,
[OffsetMinutes] [smallint] NOT NULL,
[Abbreviation] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [Tzdb].[Intervals] ADD CONSTRAINT [PK_Intervals] PRIMARY KEY NONCLUSTERED  ([Id]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_Intervals_Local] ON [Tzdb].[Intervals] ([ZoneId], [LocalStart], [LocalEnd], [UtcStart]) INCLUDE ([Abbreviation], [OffsetMinutes]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_Intervals_Utc] ON [Tzdb].[Intervals] ([ZoneId], [UtcStart], [UtcEnd]) INCLUDE ([Abbreviation], [OffsetMinutes]) ON [PRIMARY]
GO
ALTER TABLE [Tzdb].[Intervals] ADD CONSTRAINT [FK_Intervals_Zones] FOREIGN KEY ([ZoneId]) REFERENCES [Tzdb].[Zones] ([Id])
GO
Uses