CREATE TABLE [dbo].[Trips]
(
[PriKey] [int] NOT NULL IDENTITY(1, 1),
[TripNo] [int] NOT NULL,
[DriverEmpNo] [int] NOT NULL,
[Complete] [bit] NOT NULL CONSTRAINT [DF_Trips_Complete] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Trips] ADD CONSTRAINT [PK_Trips] PRIMARY KEY CLUSTERED ([PriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_Trips_DriverEmpNo] ON [dbo].[Trips] ([DriverEmpNo]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Trips] ADD CONSTRAINT [FK_Trips_Sysuser] FOREIGN KEY ([DriverEmpNo]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
GRANT SELECT ON [dbo].[Trips] TO [MssExec]
GRANT INSERT ON [dbo].[Trips] TO [MssExec]
GRANT DELETE ON [dbo].[Trips] TO [MssExec]
GRANT UPDATE ON [dbo].[Trips] TO [MssExec]
GO