IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[LockedWareGroups]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
CREATE TABLE [dbo].[LockedWareGroups](
	[WareGroupNumber] [int] NOT NULL,
	[FK_UserIDNumber] [int] NOT NULL,
	[LockingTime] [datetime] NOT NULL,
 CONSTRAINT [PK_LockedWareGroups] PRIMARY KEY CLUSTERED 
(
	[WareGroupNumber] ASC,
	[FK_UserIDNumber] ASC
)) ON [PRIMARY]
GO
