Tables [dbo].[LocalServiceLaborRequest]
Properties
PropertyValue
Row Count (~)0
Created4:09:24 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_LocalServiceLaborRequest: LocalServiceLaborRequestIDLocalServiceLaborRequestIDint4
No
1 - 1
Foreign Keys FK_LocalServiceLaborRequest_LocalServiceFID: [dbo].[LocServ].LocalServiceFIDIndexes IX_LocalServiceLaborRequest_LocalServiceFID_LaborTypeFID: LocalServiceFID\LaborTypeFIDLocalServiceFIDint4
No
Foreign Keys FK_LocalServiceLaborRequest_LaborTypeFID: [dbo].[LaborType].LaborTypeFIDIndexes IX_LocalServiceLaborRequest_LocalServiceFID_LaborTypeFID: LocalServiceFID\LaborTypeFIDLaborTypeFIDint4
No
Quantityint4
No
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_LocalServiceLaborRequest: LocalServiceLaborRequestIDPK_LocalServiceLaborRequestLocalServiceLaborRequestID
Yes
IX_LocalServiceLaborRequest_LocalServiceFID_LaborTypeFIDLocalServiceFID, LaborTypeFID
Yes
Foreign Keys Foreign Keys
NameDeleteColumns
FK_LocalServiceLaborRequest_LaborTypeFIDLaborTypeFID->[dbo].[LaborType].[PriKey]
FK_LocalServiceLaborRequest_LocalServiceFIDCascadeLocalServiceFID->[dbo].[LocServ].[PriKey]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[LocalServiceLaborRequest]
(
[LocalServiceLaborRequestID] [int] NOT NULL IDENTITY(1, 1),
[LocalServiceFID] [int] NOT NULL,
[LaborTypeFID] [int] NOT NULL,
[Quantity] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[LocalServiceLaborRequest] ADD CONSTRAINT [PK_LocalServiceLaborRequest] PRIMARY KEY CLUSTERED  ([LocalServiceLaborRequestID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[LocalServiceLaborRequest] ADD CONSTRAINT [IX_LocalServiceLaborRequest_LocalServiceFID_LaborTypeFID] UNIQUE NONCLUSTERED  ([LocalServiceFID], [LaborTypeFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[LocalServiceLaborRequest] ADD CONSTRAINT [FK_LocalServiceLaborRequest_LaborTypeFID] FOREIGN KEY ([LaborTypeFID]) REFERENCES [dbo].[LaborType] ([PriKey])
GO
ALTER TABLE [dbo].[LocalServiceLaborRequest] ADD CONSTRAINT [FK_LocalServiceLaborRequest_LocalServiceFID] FOREIGN KEY ([LocalServiceFID]) REFERENCES [dbo].[LocServ] ([PriKey]) ON DELETE CASCADE
GO
GRANT SELECT ON  [dbo].[LocalServiceLaborRequest] TO [MssExec]
GRANT INSERT ON  [dbo].[LocalServiceLaborRequest] TO [MssExec]
GRANT DELETE ON  [dbo].[LocalServiceLaborRequest] TO [MssExec]
GRANT UPDATE ON  [dbo].[LocalServiceLaborRequest] TO [MssExec]
GO
Uses
Used By