Tables [dbo].[SalesTeamSplit]
Properties
PropertyValue
Row Count (~)0
Created9:11:13 AM Friday, December 7, 2018
Last Modified9:11:26 AM Friday, December 7, 2018
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Primary Key PK_SalesTeamSplit: SalesTeamSplitIDSalesTeamSplitIDint4
No
1 - 1
Cluster Key IX_SalesTeamSplit_AccountProfileFID_SysUserLaborTypeMapFID: AccountProfileFID\SysUserLaborTypeMapFIDForeign Keys FK_SalesTeamSplit_AccountProfiles: [dbo].[AccountProfiles].AccountProfileFIDAccountProfileFIDint4
No
Cluster Key IX_SalesTeamSplit_AccountProfileFID_SysUserLaborTypeMapFID: AccountProfileFID\SysUserLaborTypeMapFIDForeign Keys FK_SalesTeamSplit_SysUserLaborTypeMap: [dbo].[SysUserLaborTypeMap].SysUserLaborTypeMapFIDSysUserLaborTypeMapFIDint4
No
Check Constraints CK_SalesTeamSplit_Percentage : ([Percentage]>(0) AND [Percentage]<=(100))Percentagedecimal(12,2)9
No
Indexes Indexes
NameColumnsUnique
Primary Key PK_SalesTeamSplit: SalesTeamSplitIDPK_SalesTeamSplitSalesTeamSplitID
Yes
Cluster Key IX_SalesTeamSplit_AccountProfileFID_SysUserLaborTypeMapFID: AccountProfileFID\SysUserLaborTypeMapFIDIX_SalesTeamSplit_AccountProfileFID_SysUserLaborTypeMapFIDAccountProfileFID, SysUserLaborTypeMapFID
Yes
Check Constraints Check Constraints
NameOn ColumnConstraint
CK_SalesTeamSplit_PercentagePercentage([Percentage]>(0) AND [Percentage]<=(100))
Foreign Keys Foreign Keys
NameDeleteColumns
FK_SalesTeamSplit_AccountProfilesAccountProfileFID->[dbo].[AccountProfiles].[AccountProfileID]
FK_SalesTeamSplit_SysUserLaborTypeMapCascadeSysUserLaborTypeMapFID->[dbo].[SysUserLaborTypeMap].[SysUserLaborTypeMapID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[SalesTeamSplit]
(
[SalesTeamSplitID] [int] NOT NULL IDENTITY(1, 1),
[AccountProfileFID] [int] NOT NULL,
[SysUserLaborTypeMapFID] [int] NOT NULL,
[Percentage] [decimal] (12, 2) NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SalesTeamSplit] ADD CONSTRAINT [CK_SalesTeamSplit_Percentage] CHECK (([Percentage]>(0) AND [Percentage]<=(100)))
GO
ALTER TABLE [dbo].[SalesTeamSplit] ADD CONSTRAINT [PK_SalesTeamSplit] PRIMARY KEY NONCLUSTERED  ([SalesTeamSplitID]) ON [PRIMARY]
GO
CREATE UNIQUE CLUSTERED INDEX [IX_SalesTeamSplit_AccountProfileFID_SysUserLaborTypeMapFID] ON [dbo].[SalesTeamSplit] ([AccountProfileFID], [SysUserLaborTypeMapFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SalesTeamSplit] ADD CONSTRAINT [FK_SalesTeamSplit_AccountProfiles] FOREIGN KEY ([AccountProfileFID]) REFERENCES [dbo].[AccountProfiles] ([AccountProfileID])
GO
ALTER TABLE [dbo].[SalesTeamSplit] ADD CONSTRAINT [FK_SalesTeamSplit_SysUserLaborTypeMap] FOREIGN KEY ([SysUserLaborTypeMapFID]) REFERENCES [dbo].[SysUserLaborTypeMap] ([SysUserLaborTypeMapID]) ON DELETE CASCADE
GO
GRANT SELECT ON  [dbo].[SalesTeamSplit] TO [MssExec]
GRANT INSERT ON  [dbo].[SalesTeamSplit] TO [MssExec]
GRANT DELETE ON  [dbo].[SalesTeamSplit] TO [MssExec]
GRANT UPDATE ON  [dbo].[SalesTeamSplit] TO [MssExec]
GO
Uses