IF OBJECT_ID(N'dbo._TabVyroba_OperaceStartStopVydej', N'U') IS NULL
 CREATE TABLE dbo._TabVyroba_OperaceStartStopVydej (
  ID int IDENTITY(1, 1) NOT NULL,
  IDHlava int NOT NULL,
  IDKmenZbozi int NOT NULL,
  Mnozstvi numeric(19, 6) DEFAULT 0.0 NOT NULL,
  MnozstviPuvodni numeric(19, 6) DEFAULT 0.0 NOT NULL,
  IDPohybZbozi int NOT NULL,
  CONSTRAINT PK__TabVyroba_OperaceStartStopVydej PRIMARY KEY CLUSTERED (ID DESC)
    WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
 )



DROP INDEX IF EXISTS EI__TabVyroba_OperaceStartStopVydej_IDHlava ON dbo._TabVyroba_OperaceStartStopVydej
 CREATE NONCLUSTERED INDEX EI__TabVyroba_OperaceStartStopVydej_IDHlava ON dbo._TabVyroba_OperaceStartStopVydej (IDHlava)
  WITH (PAD_INDEX = OFF, DROP_EXISTING = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)

DROP INDEX IF EXISTS EI__TabVyroba_OperaceStartStopVydej_IDKmen ON dbo._TabVyroba_OperaceStartStopVydej
 CREATE NONCLUSTERED INDEX EI__TabVyroba_OperaceStartStopVydej_IDKmen ON dbo._TabVyroba_OperaceStartStopVydej (IDKmenZbozi)
  WITH (PAD_INDEX = OFF, DROP_EXISTING = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)

DROP INDEX IF EXISTS EI__TabVyroba_OperaceStartStopVydej_PohybOZ ON dbo._TabVyroba_OperaceStartStopVydej
 CREATE NONCLUSTERED INDEX EI__TabVyroba_OperaceStartStopVydej_PohybOZ ON dbo._TabVyroba_OperaceStartStopVydej (IDPohybZbozi)
  WITH (PAD_INDEX = OFF, DROP_EXISTING = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
