Tables [dbo].[FuelCost]
Properties
PropertyValue
Row Count (~)0
Created9:55:51 AM Friday, December 7, 2018
Last Modified9:56:11 AM Friday, December 7, 2018
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Cluster Primary Key PK_FuelCost: FuelCostIDFuelCostIDint4
No
1 - 1
LoadFromDatedatetime8
Yes
LoadToDatedatetime8
Yes
FuelPricedecimal(12,3)9
No
DateEntereddatetime8
No
Foreign Keys FK_FuelCostEntered_Sysuser: [dbo].[Sysuser].EnteredByEnteredByint4
No
DateModifieddatetime8
Yes
Foreign Keys FK_FuelCostModified_Sysuser: [dbo].[Sysuser].ModifiedByModifiedByint4
Yes
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_FuelCost: FuelCostIDPK_FuelCostFuelCostID
Yes
Check Constraints Check Constraints
NameConstraint
CK_FuelCost_LoadFromLoadToDate(isnull([LoadFromDate],(0))<isnull([LoadToDate],(100000)) AND (1)=[dbo].[ValidFuelCostLoadDateRange]([LoadFromDate],[LoadToDate]))
Foreign Keys Foreign Keys
NameColumns
FK_FuelCostEntered_SysuserEnteredBy->[dbo].[Sysuser].[SysUserID]
FK_FuelCostModified_SysuserModifiedBy->[dbo].[Sysuser].[SysUserID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[FuelCost]
(
[FuelCostID] [int] NOT NULL IDENTITY(1, 1),
[LoadFromDate] [datetime] NULL,
[LoadToDate] [datetime] NULL,
[FuelPrice] [decimal] (12, 3) NOT NULL,
[DateEntered] [datetime] NOT NULL,
[EnteredBy] [int] NOT NULL,
[DateModified] [datetime] NULL,
[ModifiedBy] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[FuelCost] ADD CONSTRAINT [CK_FuelCost_LoadFromLoadToDate] CHECK ((isnull([LoadFromDate],(0))<isnull([LoadToDate],(100000)) AND (1)=[dbo].[ValidFuelCostLoadDateRange]([LoadFromDate],[LoadToDate])))
GO
ALTER TABLE [dbo].[FuelCost] ADD CONSTRAINT [PK_FuelCost] PRIMARY KEY CLUSTERED  ([FuelCostID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[FuelCost] ADD CONSTRAINT [FK_FuelCostEntered_Sysuser] FOREIGN KEY ([EnteredBy]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
ALTER TABLE [dbo].[FuelCost] ADD CONSTRAINT [FK_FuelCostModified_Sysuser] FOREIGN KEY ([ModifiedBy]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
GRANT SELECT ON  [dbo].[FuelCost] TO [MssExec]
GRANT INSERT ON  [dbo].[FuelCost] TO [MssExec]
GRANT DELETE ON  [dbo].[FuelCost] TO [MssExec]
GRANT UPDATE ON  [dbo].[FuelCost] TO [MssExec]
GO
Uses