Tables [dbo].[SafetySystemEquipment]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
HeapYes
Row Count (~)3
Created5:32:31 PM Wednesday, January 2, 2008
Last Modified8:20:29 AM Friday, December 7, 2018
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Primary Key PK_SafetySystemEquipment: SafetySystemEquipmentIDSafetySystemEquipmentIDint4
No
1 - 1
Foreign Keys FK_SafetySystemEquipment_Equip: [dbo].[Equip].EquipFIDIndexes IX_SafetySystemEquipment_Equip: EquipFIDEquipFIDint4
No
Foreign Keys FK_SafetySystemEquipment_SafetySystemEquipmentConditionType: [dbo].[SafetySystemEquipmentConditionType].SafetySystemEquipmentConditionTypeFIDSafetySystemEquipmentConditionTypeFIDint4
Yes
LastSanitizedDatedatetime8
Yes
NextSanitizedDatedatetime8
Yes
LastInspectionDatedatetime8
Yes
LastInspectionOdometerint4
Yes
NextInspectionDatedatetime8
Yes
LastServiceDatedatetime8
Yes
LastServiceOdometerint4
Yes
NextServiceDatedatetime8
Yes
LicenseDueDatedatetime8
Yes
InterstateCommerceCommissionDueDatedatetime8
Yes
AdministrativeHoldFlagbit1
No
((0))
LicensePlateNumbervarchar(32)32
Yes
DotInspectionDatedatetime8
Yes
DotExpirationDatedatetime8
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Primary Key PK_SafetySystemEquipment: SafetySystemEquipmentIDPK_SafetySystemEquipmentSafetySystemEquipmentID
Yes
80
IX_SafetySystemEquipment_EquipEquipFID
Yes
80
Foreign Keys Foreign Keys
NameDeleteColumns
FK_SafetySystemEquipment_EquipCascadeEquipFID->[dbo].[Equip].[PriKey]
FK_SafetySystemEquipment_SafetySystemEquipmentConditionTypeSafetySystemEquipmentConditionTypeFID->[dbo].[SafetySystemEquipmentConditionType].[SafetySystemEquipmentConditionTypeID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[SafetySystemEquipment]
(
[SafetySystemEquipmentID] [int] NOT NULL IDENTITY(1, 1),
[EquipFID] [int] NOT NULL,
[SafetySystemEquipmentConditionTypeFID] [int] NULL,
[LastSanitizedDate] [datetime] NULL,
[NextSanitizedDate] [datetime] NULL,
[LastInspectionDate] [datetime] NULL,
[LastInspectionOdometer] [int] NULL,
[NextInspectionDate] [datetime] NULL,
[LastServiceDate] [datetime] NULL,
[LastServiceOdometer] [int] NULL,
[NextServiceDate] [datetime] NULL,
[LicenseDueDate] [datetime] NULL,
[InterstateCommerceCommissionDueDate] [datetime] NULL,
[AdministrativeHoldFlag] [bit] NOT NULL CONSTRAINT [DF_SafetySystemEquipment_AdministrativeHoldFlag] DEFAULT ((0)),
[LicensePlateNumber] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DotInspectionDate] [datetime] NULL,
[DotExpirationDate] [datetime] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SafetySystemEquipment] ADD CONSTRAINT [PK_SafetySystemEquipment] PRIMARY KEY NONCLUSTERED  ([SafetySystemEquipmentID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SafetySystemEquipment] ADD CONSTRAINT [IX_SafetySystemEquipment_Equip] UNIQUE NONCLUSTERED  ([EquipFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SafetySystemEquipment] ADD CONSTRAINT [FK_SafetySystemEquipment_Equip] FOREIGN KEY ([EquipFID]) REFERENCES [dbo].[Equip] ([PriKey]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[SafetySystemEquipment] ADD CONSTRAINT [FK_SafetySystemEquipment_SafetySystemEquipmentConditionType] FOREIGN KEY ([SafetySystemEquipmentConditionTypeFID]) REFERENCES [dbo].[SafetySystemEquipmentConditionType] ([SafetySystemEquipmentConditionTypeID])
GO
GRANT SELECT ON  [dbo].[SafetySystemEquipment] TO [MssExec]
GRANT INSERT ON  [dbo].[SafetySystemEquipment] TO [MssExec]
GRANT DELETE ON  [dbo].[SafetySystemEquipment] TO [MssExec]
GRANT UPDATE ON  [dbo].[SafetySystemEquipment] TO [MssExec]
GO
Uses
Used By