Tables [dbo].[LocalServiceEquipmentRequest]
Properties
PropertyValue
Row Count (~)0
Created4:09:40 PM Thursday, December 6, 2018
Last Modified4:09:41 PM Thursday, December 6, 2018
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Cluster Primary Key PK_LocalServiceEquipmentRequest: LocalServiceEquipmentRequestIDLocalServiceEquipmentRequestIDint4
No
1 - 1
Foreign Keys FK_LocalServiceEquipmentRequest_LocalServiceFID: [dbo].[LocServ].LocalServiceFIDIndexes IX_LocalServiceEquipmentRequest_LocalServiceFID_EquipmentTypeFID: LocalServiceFID\EquipmentTypeFIDLocalServiceFIDint4
No
Foreign Keys FK_LocalServiceEquipmentRequest_EquipmentTypeFID: [dbo].[EqType].EquipmentTypeFIDIndexes IX_LocalServiceEquipmentRequest_LocalServiceFID_EquipmentTypeFID: LocalServiceFID\EquipmentTypeFIDEquipmentTypeFIDint4
No
Quantityint4
No
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_LocalServiceEquipmentRequest: LocalServiceEquipmentRequestIDPK_LocalServiceEquipmentRequestLocalServiceEquipmentRequestID
Yes
IX_LocalServiceEquipmentRequest_LocalServiceFID_EquipmentTypeFIDLocalServiceFID, EquipmentTypeFID
Yes
Foreign Keys Foreign Keys
NameDeleteColumns
FK_LocalServiceEquipmentRequest_EquipmentTypeFIDEquipmentTypeFID->[dbo].[EqType].[TypeNumber]
FK_LocalServiceEquipmentRequest_LocalServiceFIDCascadeLocalServiceFID->[dbo].[LocServ].[PriKey]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[LocalServiceEquipmentRequest]
(
[LocalServiceEquipmentRequestID] [int] NOT NULL IDENTITY(1, 1),
[LocalServiceFID] [int] NOT NULL,
[EquipmentTypeFID] [int] NOT NULL,
[Quantity] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[LocalServiceEquipmentRequest] ADD CONSTRAINT [PK_LocalServiceEquipmentRequest] PRIMARY KEY CLUSTERED  ([LocalServiceEquipmentRequestID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[LocalServiceEquipmentRequest] ADD CONSTRAINT [IX_LocalServiceEquipmentRequest_LocalServiceFID_EquipmentTypeFID] UNIQUE NONCLUSTERED  ([LocalServiceFID], [EquipmentTypeFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[LocalServiceEquipmentRequest] ADD CONSTRAINT [FK_LocalServiceEquipmentRequest_EquipmentTypeFID] FOREIGN KEY ([EquipmentTypeFID]) REFERENCES [dbo].[EqType] ([TypeNumber])
GO
ALTER TABLE [dbo].[LocalServiceEquipmentRequest] ADD CONSTRAINT [FK_LocalServiceEquipmentRequest_LocalServiceFID] FOREIGN KEY ([LocalServiceFID]) REFERENCES [dbo].[LocServ] ([PriKey]) ON DELETE CASCADE
GO
GRANT SELECT ON  [dbo].[LocalServiceEquipmentRequest] TO [MssExec]
GRANT INSERT ON  [dbo].[LocalServiceEquipmentRequest] TO [MssExec]
GRANT DELETE ON  [dbo].[LocalServiceEquipmentRequest] TO [MssExec]
GRANT UPDATE ON  [dbo].[LocalServiceEquipmentRequest] TO [MssExec]
GO
Uses