USE [Podnik]
GO
ALTER TABLE [dbo].[zamestnanci] DROP CONSTRAINT [FK_zamestnanci_oddeleni]
GO
ALTER TABLE [dbo].[bydliste] DROP CONSTRAINT [FK_bydliste_zamestnanci]
GO
ALTER TABLE [dbo].[bydliste] DROP CONSTRAINT [FK_bydliste_ciselnik]
GO
ALTER TABLE [dbo].[bydliste] DROP CONSTRAINT [FK_bydliste_adresa]
GO
/****** Object:  Table [dbo].[zamestnanci]    Script Date: 18.3.2014 16:32:51 ******/
DROP TABLE [dbo].[zamestnanci]
GO
/****** Object:  Table [dbo].[oddeleni]    Script Date: 18.3.2014 16:32:51 ******/
DROP TABLE [dbo].[oddeleni]
GO
/****** Object:  Table [dbo].[log]    Script Date: 18.3.2014 16:32:51 ******/
DROP TABLE [dbo].[log]
GO
/****** Object:  Table [dbo].[ciselnik]    Script Date: 18.3.2014 16:32:51 ******/
DROP TABLE [dbo].[ciselnik]
GO
/****** Object:  Table [dbo].[bydliste]    Script Date: 18.3.2014 16:32:51 ******/
DROP TABLE [dbo].[bydliste]
GO
/****** Object:  Table [dbo].[adresa]    Script Date: 18.3.2014 16:32:51 ******/
DROP TABLE [dbo].[adresa]
GO
USE [master]
GO
/****** Object:  Database [Podnik]    Script Date: 18.3.2014 16:32:51 ******/
DROP DATABASE [Podnik]
GO
/****** Object:  Database [Podnik]    Script Date: 18.3.2014 16:32:51 ******/
CREATE DATABASE [Podnik] ON  PRIMARY 
( NAME = N'Podnik', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\Podnik.mdf' , SIZE = 5120KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
 LOG ON 
( NAME = N'Podnik_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\Podnik_log.ldf' , SIZE = 2048KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [Podnik].[dbo].[sp_fulltext_database] @action = 'enable'
end
GO
ALTER DATABASE [Podnik] SET ANSI_NULL_DEFAULT OFF 
GO
ALTER DATABASE [Podnik] SET ANSI_NULLS OFF 
GO
ALTER DATABASE [Podnik] SET ANSI_PADDING OFF 
GO
ALTER DATABASE [Podnik] SET ANSI_WARNINGS OFF 
GO
ALTER DATABASE [Podnik] SET ARITHABORT OFF 
GO
ALTER DATABASE [Podnik] SET AUTO_CLOSE OFF 
GO
ALTER DATABASE [Podnik] SET AUTO_CREATE_STATISTICS ON 
GO
ALTER DATABASE [Podnik] SET AUTO_SHRINK OFF 
GO
ALTER DATABASE [Podnik] SET AUTO_UPDATE_STATISTICS ON 
GO
ALTER DATABASE [Podnik] SET CURSOR_CLOSE_ON_COMMIT OFF 
GO
ALTER DATABASE [Podnik] SET CURSOR_DEFAULT  GLOBAL 
GO
ALTER DATABASE [Podnik] SET CONCAT_NULL_YIELDS_NULL OFF 
GO
ALTER DATABASE [Podnik] SET NUMERIC_ROUNDABORT OFF 
GO
ALTER DATABASE [Podnik] SET QUOTED_IDENTIFIER OFF 
GO
ALTER DATABASE [Podnik] SET RECURSIVE_TRIGGERS OFF 
GO
ALTER DATABASE [Podnik] SET  DISABLE_BROKER 
GO
ALTER DATABASE [Podnik] SET AUTO_UPDATE_STATISTICS_ASYNC OFF 
GO
ALTER DATABASE [Podnik] SET DATE_CORRELATION_OPTIMIZATION OFF 
GO
ALTER DATABASE [Podnik] SET TRUSTWORTHY OFF 
GO
ALTER DATABASE [Podnik] SET ALLOW_SNAPSHOT_ISOLATION OFF 
GO
ALTER DATABASE [Podnik] SET PARAMETERIZATION SIMPLE 
GO
ALTER DATABASE [Podnik] SET READ_COMMITTED_SNAPSHOT OFF 
GO
ALTER DATABASE [Podnik] SET HONOR_BROKER_PRIORITY OFF 
GO
ALTER DATABASE [Podnik] SET RECOVERY FULL 
GO
ALTER DATABASE [Podnik] SET  MULTI_USER 
GO
ALTER DATABASE [Podnik] SET PAGE_VERIFY CHECKSUM  
GO
ALTER DATABASE [Podnik] SET DB_CHAINING OFF 
GO
EXEC sys.sp_db_vardecimal_storage_format N'Podnik', N'ON'
GO
USE [Podnik]
GO
/****** Object:  Table [dbo].[adresa]    Script Date: 18.3.2014 16:32:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[adresa](
	[adr_id] [int] NOT NULL,
	[adr_sta] [varchar](3) NOT NULL,
	[adr_obc] [varchar](30) NOT NULL,
	[adr_cob] [varchar](30) NULL,
	[adr_uli] [varchar](30) NULL,
	[adr_cpo] [smallint] NULL,
	[adr_cor] [smallint] NULL,
	[adr_znk] [varchar](1) NULL,
	[adr_psc] [int] NULL,
 CONSTRAINT [PK_adresa] PRIMARY KEY CLUSTERED 
(
	[adr_id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[bydliste]    Script Date: 18.3.2014 16:32:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[bydliste](
	[byd_id] [int] IDENTITY(1,1) NOT NULL,
	[zam_id] [int] NOT NULL,
	[adr_id] [int] NOT NULL,
	[cis_id] [tinyint] NOT NULL,
 CONSTRAINT [PK_bydliste] PRIMARY KEY CLUSTERED 
(
	[byd_id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
/****** Object:  Table [dbo].[ciselnik]    Script Date: 18.3.2014 16:32:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ciselnik](
	[cis_id] [tinyint] IDENTITY(1,1) NOT NULL,
	[cis_pop] [nvarchar](50) NOT NULL,
 CONSTRAINT [PK_ciselnik] PRIMARY KEY CLUSTERED 
(
	[cis_id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
/****** Object:  Table [dbo].[log]    Script Date: 18.3.2014 16:32:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[log](
	[log_id] [int] IDENTITY(1,1) NOT NULL,
	[log_tab] [varchar](50) NOT NULL,
	[tab_id] [int] NOT NULL,
	[log_dat] [timestamp] NOT NULL
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[oddeleni]    Script Date: 18.3.2014 16:32:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[oddeleni](
	[odd_id] [tinyint] NOT NULL,
	[odd_naz] [varchar](20) NULL,
 CONSTRAINT [PK_pozice] PRIMARY KEY CLUSTERED 
(
	[odd_id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[zamestnanci]    Script Date: 18.3.2014 16:32:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[zamestnanci](
	[zam_id] [int] IDENTITY(1,1) NOT NULL,
	[zam_pri] [varchar](20) NULL,
	[zam_jme] [varchar](50) NULL,
	[zam_dna] [date] NULL,
	[zam_ti1] [varchar](20) NULL,
	[zam_ti2] [varchar](20) NULL,
	[odd_id] [tinyint] NULL,
	[zam_sta] [tinyint] NULL,
 CONSTRAINT [PK_zamestnanci] PRIMARY KEY CLUSTERED 
(
	[zam_id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (1, N'CZ', N'Štáblovice', NULL, NULL, 157, NULL, NULL, 74782)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (2, N'CZ', N'Dolní Benešov', N'Dolní Benešov', N'Hlučínská', NULL, 41, NULL, 74722)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (3, N'CZ', N'Opava', NULL, N'Veleslavínova', 9, NULL, NULL, 74701)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (4, N'CZ', N'Hradec nad Moravicí', N'Hradec nad Moravicí', N'parcela č. 109/2', NULL, NULL, NULL, 74741)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (5, N'CZ', N'Velké Hoštice', N'Velké Hoštice', N'Opavská', 60, NULL, NULL, 74731)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (6, N'CZ', N'Opava', N'Jaktař', N'Nákladní', 2833, NULL, NULL, 74601)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (7, N'CZ', N'Opava', N'Předměstí', N'Nákladní', 2833, 45, N'a', 74601)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (8, N'CZ', N'Hlučín', N'Hlučín', N'Školní', 226, 8, NULL, 74801)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (9, N'CZ', N'Hlučín', N'Hlučín', N'Hrnčířská', 265, 16, NULL, 74801)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (10, N'CZ', N'Opava', N'Kylešovice', NULL, NULL, NULL, NULL, 74706)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (11, N'CZ', N'Opava', N'Město', N'Pekařská', 64, NULL, NULL, 74601)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (12, N'CZ', N'Opava', N'Předměstí', N'Nákladní', 20, NULL, NULL, 74600)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (13, N'CZ', N'Opava', NULL, N'Bílovecká', 62, NULL, NULL, 74706)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (14, N'CZ', N'Mokré Lazce', N'Mokré Lazce', N'P.Křížkovského', NULL, 165, NULL, 74762)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (15, N'CZ', N'Hradec nad Moravicí', N'Hradec-Nová Ves', N'Nová Ves', 139, NULL, NULL, 79083)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (16, N'CZ', N'Hradec nad Moravicí', N'Hradec-Nová Ves', NULL, NULL, NULL, NULL, 79083)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (17, N'CZ', N'Budišov nad Budišovkou', N'Budišov nad Budišovkou', N'Bezručova', 150, NULL, NULL, 74787)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (18, N'CZ', N'Budišov nad Budišovkou', N'Budišov nad Budišovkou', N'Bezručova', 510, NULL, NULL, 74901)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (19, N'CZ', N'Budišov nad Budišovkou', N'Budišov nad Budišovkou', N'Bezručova', 510, NULL, NULL, 74787)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (20, N'CZ', N'Opava', N'Město', N'Nákladní', NULL, NULL, NULL, 74601)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (21, N'CZ', N'Opava', NULL, N'Otická', 12, 14, NULL, 74601)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (22, N'CZ', N'Hlučín', NULL, N'Hornická', 3, NULL, NULL, 74801)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (23, N'CZ', N'Opava', NULL, N'U fortuny', 3, NULL, NULL, 74601)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (24, N'CZ', N'Opava', NULL, N'nám.Republiky', 11, NULL, NULL, 74601)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (25, N'CZ', N'Opava', N'Město', N'Kolářská', 13, NULL, NULL, 74601)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (26, N'CZ', N'Opava', N'Předměstí', N'Bruntálská', NULL, NULL, NULL, 74601)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (27, N'CZ', N'Vítkov', NULL, NULL, 44, NULL, NULL, 74901)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (28, N'CZ', N'Hať', N'Hať', N'Na Chromině', 215, 33, NULL, 74716)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (29, N'CZ', N'Opava', N'Kylešovice', N'Kylešovská', 872, 45, NULL, 74601)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (30, N'CZ', N'Opava', N'Předměstí', N'Bochenkova', 1157, 18, NULL, 74601)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (31, N'CZ', N'Opava', NULL, N'Bílovecká', 1, NULL, NULL, 74601)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (32, N'CZ', N'Opava', N'Město', N'Veleslavínova', 9, NULL, NULL, 74601)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (33, N'CZ', N'Opava', N'Město', N'Veleslavínova', 9, NULL, NULL, 74601)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (34, N'CZ', N'Opava', N'Město', N'Pekařská', 9, NULL, NULL, 74601)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (35, N'CZ', N'Opava', N'Město', N'nám.Republiky', 11, NULL, NULL, 74601)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (36, N'CZ', N'Otice', N'Otice', N'Areál ZD Otice', NULL, NULL, NULL, 74781)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (37, N'CZ', N'Opava', N'Město', N'Pivovarská', NULL, 9, NULL, 74601)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (38, N'CZ', N'Opava', N'Město', N'Masarykova tř.', 1, NULL, NULL, 74601)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (39, N'CZ', N'Vítkov', N'Vítkov', N'Opavská', 686, NULL, NULL, 74901)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (40, N'CZ', N'Opava', N'Kylešovice', N'Hlavní', 224, 178, NULL, 74706)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (41, N'CZ', N'Hrabyně', N'Hrabyně', NULL, NULL, 8, NULL, 74763)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (42, N'CZ', N'Opava', NULL, N'Na Pastvisku', 12, NULL, NULL, 74705)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (43, N'CZ', N'Opava', NULL, N'Na Pastvisku', 12, NULL, NULL, 74601)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (44, N'CZ', N'Opava', NULL, N'U Panského dvora', 2790, 8, N'A', 74601)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (45, N'CZ', N'Opava', N'Komárov', N'Podvihovská', 7, NULL, NULL, 74770)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (46, N'CZ', N'Opava', NULL, N'Kollárova', 1, NULL, NULL, 74601)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (47, N'CZ', N'Hlučín', N'Hlučín', N'Celní', 404, 9, NULL, 74801)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (48, N'CZ', N'Opava', NULL, N'Na Bahně', 33, NULL, NULL, 74601)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (49, N'CZ', N'Šilheřovice', NULL, N'Šilheřovice', 139, NULL, NULL, 74715)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (50, N'CZ', N'Šilheřovice', N'Šilheřovice', N'Za Farou', 3367, NULL, NULL, 74715)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (51, N'CZ', N'Opava', NULL, N'Horovo nám.', 3, NULL, NULL, 74601)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (52, N'CZ', N'Kravaře', NULL, N'Mírová', 18, NULL, NULL, 74721)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (53, N'CZ', N'Opava', NULL, N'Jasmínova', 32, NULL, NULL, 74706)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (54, N'CZ', N'Opava', N'Město', N'Jasmínová', 32, NULL, NULL, 74706)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (55, N'CZ', N'Opava', N'Město', N'7.listopadu', 29, NULL, NULL, 74601)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (56, N'CZ', N'Opava', N'Vávrovice', N'K Celnici', 107, 14, NULL, 74773)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (57, N'CZ', N'Mokré Lazce', N'Mokré Lazce', N'P.Křížkovského', 165, NULL, NULL, 74762)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (58, N'CZ', N'Chvalíkovice', N'Chvalíkovice', N'České školy', 151, 7, NULL, 74706)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (59, N'CZ', N'Opava', N'Město', N'Ed. Beneše', 15, NULL, NULL, 74601)
INSERT [dbo].[adresa] ([adr_id], [adr_sta], [adr_obc], [adr_cob], [adr_uli], [adr_cpo], [adr_cor], [adr_znk], [adr_psc]) VALUES (60, N'CZ', N'Opava', N'Předměstí', N'Husova', 277, 32, NULL, 74601)
SET IDENTITY_INSERT [dbo].[bydliste] ON 

INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (1, 47, 55, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (2, 48, 36, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (3, 49, 17, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (4, 6, 18, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (5, 1, 19, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (6, 33, 13, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (7, 34, 31, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (8, 25, 30, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (9, 2, 26, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (10, 35, 47, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (11, 50, 58, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (12, 40, 59, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (13, 15, 40, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (14, 41, 2, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (15, 16, 22, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (16, 42, 51, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (17, 36, 9, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (18, 7, 60, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (19, 26, 53, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (20, 27, 54, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (21, 9, 56, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (22, 10, 25, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (23, 8, 46, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (24, 13, 29, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (25, 28, 38, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (26, 29, 52, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (27, 43, 48, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (28, 5, 28, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (29, 32, 42, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (30, 23, 43, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (31, 3, 6, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (32, 44, 7, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (33, 14, 12, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (34, 17, 20, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (35, 18, 24, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (36, 4, 35, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (37, 45, 15, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (38, 37, 5, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (39, 30, 39, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (40, 38, 21, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (41, 19, 14, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (42, 11, 57, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (43, 31, 4, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (44, 20, 11, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (45, 24, 34, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (46, 21, 37, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (47, 12, 45, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (48, 39, 49, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (49, 46, 8, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (50, 22, 23, 1)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (51, 9, 44, 2)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (52, 5, 3, 2)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (53, 6, 32, 2)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (54, 3, 33, 2)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (55, 2, 50, 2)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (56, 8, 41, 2)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (57, 7, 1, 2)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (58, 4, 10, 3)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (59, 1, 16, 3)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (60, 2, 27, 3)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (61, 35, 53, 3)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (62, 50, 54, 3)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (63, 40, 56, 2)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (64, 15, 25, 2)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (65, 41, 46, 3)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (66, 16, 29, 3)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (67, 42, 38, 3)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (68, 36, 52, 3)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (69, 7, 48, 3)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (70, 26, 28, 3)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (71, 27, 42, 2)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (72, 38, 43, 2)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (73, 19, 6, 3)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (74, 11, 7, 3)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (75, 31, 18, 3)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (76, 20, 19, 2)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (77, 24, 13, 3)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (78, 21, 31, 3)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (79, 12, 30, 2)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (80, 39, 26, 3)
INSERT [dbo].[bydliste] ([byd_id], [zam_id], [adr_id], [cis_id]) VALUES (81, 46, 47, 3)
SET IDENTITY_INSERT [dbo].[bydliste] OFF
SET IDENTITY_INSERT [dbo].[ciselnik] ON 

INSERT [dbo].[ciselnik] ([cis_id], [cis_pop]) VALUES (1, N'Bydliště')
INSERT [dbo].[ciselnik] ([cis_id], [cis_pop]) VALUES (2, N'Pobyt')
INSERT [dbo].[ciselnik] ([cis_id], [cis_pop]) VALUES (3, N'Jiné')
INSERT [dbo].[ciselnik] ([cis_id], [cis_pop]) VALUES (4, N'Doručovací adresa')
SET IDENTITY_INSERT [dbo].[ciselnik] OFF
SET IDENTITY_INSERT [dbo].[log] ON 

INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (19, N'zamestnanci', 50)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (20, N'zamestnanci', 49)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (21, N'zamestnanci', 48)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (22, N'zamestnanci', 47)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (23, N'zamestnanci', 47)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (24, N'zamestnanci', 48)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (25, N'zamestnanci', 49)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (26, N'zamestnanci', 50)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (27, N'zamestnanci', 50)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (28, N'zamestnanci', 50)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (29, N'zamestnanci', 49)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (30, N'zamestnanci', 48)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (31, N'zamestnanci', 47)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1023, N'zamestnanci', 49)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1024, N'zamestnanci', 50)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1025, N'zamestnanci', 49)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1026, N'zamestnanci', 48)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1027, N'zamestnanci', 47)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1028, N'zamestnanci', 46)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1029, N'zamestnanci', 45)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1030, N'zamestnanci', 44)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1031, N'zamestnanci', 43)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1032, N'zamestnanci', 42)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1033, N'zamestnanci', 41)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1034, N'zamestnanci', 40)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1035, N'zamestnanci', 39)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1036, N'zamestnanci', 38)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1037, N'zamestnanci', 37)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1038, N'zamestnanci', 36)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1039, N'zamestnanci', 35)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1040, N'zamestnanci', 34)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1041, N'zamestnanci', 33)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1042, N'zamestnanci', 32)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1043, N'zamestnanci', 31)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1044, N'zamestnanci', 30)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1045, N'zamestnanci', 29)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1046, N'zamestnanci', 28)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1047, N'zamestnanci', 27)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1048, N'zamestnanci', 26)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1049, N'zamestnanci', 25)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1050, N'zamestnanci', 24)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1051, N'zamestnanci', 23)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1052, N'zamestnanci', 22)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1053, N'zamestnanci', 21)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1054, N'zamestnanci', 20)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1055, N'zamestnanci', 19)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1056, N'zamestnanci', 18)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1057, N'zamestnanci', 17)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1058, N'zamestnanci', 16)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1059, N'zamestnanci', 15)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1060, N'zamestnanci', 14)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1061, N'zamestnanci', 13)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1062, N'zamestnanci', 12)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1063, N'zamestnanci', 11)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1064, N'zamestnanci', 10)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1065, N'zamestnanci', 9)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1066, N'zamestnanci', 8)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1067, N'zamestnanci', 7)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1068, N'zamestnanci', 6)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1069, N'zamestnanci', 5)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1070, N'zamestnanci', 4)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1071, N'zamestnanci', 3)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1072, N'zamestnanci', 2)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1073, N'zamestnanci', 1)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (1074, N'zamestnanci', 49)
INSERT [dbo].[log] ([log_id], [log_tab], [tab_id]) VALUES (32, N'zamestnanci', 50)
SET IDENTITY_INSERT [dbo].[log] OFF
INSERT [dbo].[oddeleni] ([odd_id], [odd_naz]) VALUES (1, N'Vedení              ')
INSERT [dbo].[oddeleni] ([odd_id], [odd_naz]) VALUES (2, N'Ekonomické          ')
INSERT [dbo].[oddeleni] ([odd_id], [odd_naz]) VALUES (3, N'Obchodní            ')
INSERT [dbo].[oddeleni] ([odd_id], [odd_naz]) VALUES (4, N'Osobní              ')
INSERT [dbo].[oddeleni] ([odd_id], [odd_naz]) VALUES (5, N'Dílna 1             ')
INSERT [dbo].[oddeleni] ([odd_id], [odd_naz]) VALUES (6, N'Dílna 2             ')
INSERT [dbo].[oddeleni] ([odd_id], [odd_naz]) VALUES (7, N'Dílna 3             ')
INSERT [dbo].[oddeleni] ([odd_id], [odd_naz]) VALUES (8, N'Sklad               ')
INSERT [dbo].[oddeleni] ([odd_id], [odd_naz]) VALUES (9, N'Údržba              ')
SET IDENTITY_INSERT [dbo].[zamestnanci] ON 

INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (1, N'Dau', N'Danh Thang', CAST(0x37030B00 AS Date), N'Mgr.', N'Ph.D.', 1, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (2, N'Nováková', N'Eliška', CAST(0xC3D50A00 AS Date), N'Mgr.', N'CSc.', 1, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (3, N'Sládek', N'Michal', CAST(0x29010B00 AS Date), NULL, NULL, 1, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (4, N'Maxim', N'Pavel', CAST(0x28E50A00 AS Date), NULL, N'Dr.', 1, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (5, N'Jiranová', N'Marie', CAST(0xD0050B00 AS Date), N'RNDr.', NULL, 2, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (6, N'Thai Huu', N'Cuong', CAST(0x54030B00 AS Date), N'Ing.', NULL, 2, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (7, N'Drápalová', N'Jana', CAST(0x13090B00 AS Date), N'Ing.', NULL, 2, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (8, N'Berda', N'John', CAST(0x64E50A00 AS Date), N'MBA', NULL, 3, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (9, N'MITTELBACH', N'Jiří', CAST(0x1FEA0A00 AS Date), NULL, NULL, 3, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (10, N'Suchánek', N'Jiří', CAST(0x470E0B00 AS Date), NULL, NULL, 3, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (11, N'Mai', N'Thi An', CAST(0x02FD0A00 AS Date), NULL, NULL, 3, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (12, N'HOLUB', N'Viliam', CAST(0xF40A0B00 AS Date), N'Bc.', NULL, 4, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (13, N'Riesovová', N'Jozefa', CAST(0x07100B00 AS Date), NULL, NULL, 4, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (14, N'Tlačil', N'Miroslav', CAST(0x8FE70A00 AS Date), NULL, NULL, 5, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (15, N'Konůpek', N'Ivan', CAST(0xFAF20A00 AS Date), NULL, NULL, 5, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (16, N'Sotorníková', N'Ivana', CAST(0x1AE50A00 AS Date), NULL, NULL, 5, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (17, N'Kacav', N'Moše', CAST(0x50030B00 AS Date), NULL, NULL, 5, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (18, N'Šuhaj', N'Nikola', CAST(0x26DA0A00 AS Date), NULL, NULL, 5, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (19, N'Mc Cormick', N'Splinter', CAST(0x01E80A00 AS Date), NULL, NULL, 5, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (20, N'Svergunov', N'Valentyn', CAST(0x71F30A00 AS Date), NULL, NULL, 5, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (21, N'Řehková', N'Věra', CAST(0x670A0B00 AS Date), NULL, NULL, 5, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (22, N'Matysová', N'Zdenka', CAST(0x51140B00 AS Date), NULL, NULL, 5, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (23, N'Poláková', N'Martina', CAST(0x93120B00 AS Date), NULL, NULL, 6, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (24, N'Poláková', N'Věra', CAST(0x8DFA0A00 AS Date), NULL, NULL, 6, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (25, N'Gruber', N'Dominik', CAST(0xE1D60A00 AS Date), NULL, NULL, 6, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (26, N'Martinů', N'Jarmila', CAST(0x53080B00 AS Date), NULL, NULL, 6, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (27, N'Walter', N'Jaromír', CAST(0xCEF40A00 AS Date), NULL, NULL, 6, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (28, N'Spáčil', N'Ladislav', CAST(0x47090B00 AS Date), NULL, NULL, 6, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (29, N'Konvička', N'Luděk', CAST(0xED110B00 AS Date), NULL, NULL, 6, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (30, N'Motejlek', N'Petr', CAST(0x23FB0A00 AS Date), NULL, NULL, 6, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (31, N'Tran Van', N'Tuan', CAST(0xAFFB0A00 AS Date), NULL, NULL, 6, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (32, N'Chrdle', N'Martin', CAST(0x68CF0A00 AS Date), NULL, NULL, 7, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (33, N'Koběrská', N'Danuše', CAST(0x56030B00 AS Date), NULL, NULL, 7, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (34, N'Arefyev', N'Dmitriy', CAST(0x95C10A00 AS Date), NULL, NULL, 7, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (35, N'Nguyen Duc', N'Hai', CAST(0x91DA0A00 AS Date), NULL, NULL, 7, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (36, N'Ptáček', N'Jan', CAST(0x42140B00 AS Date), NULL, NULL, 7, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (37, N'Čachra', N'Petr', CAST(0x10FA0A00 AS Date), NULL, NULL, 7, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (38, N'Záhořová', N'Radka', CAST(0x23C10A00 AS Date), NULL, NULL, 7, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (39, N'Hanuš', N'Vít', CAST(0x26F70A00 AS Date), NULL, NULL, 7, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (40, N'Garmash', N'Igor', CAST(0xB9F10A00 AS Date), NULL, NULL, 7, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (41, N'Straka', N'Ivan', CAST(0xD0060B00 AS Date), NULL, NULL, 7, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (42, N'Konvička', N'Jan', CAST(0xA7080B00 AS Date), NULL, NULL, 7, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (43, N'Fridrich', N'Lukáš', CAST(0xFF0F0B00 AS Date), NULL, NULL, 8, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (44, N'Vágnerová', N'Milena', CAST(0x6E050B00 AS Date), NULL, NULL, 8, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (45, N'Armén', N'Petr', CAST(0x4C090B00 AS Date), NULL, NULL, 8, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (46, N'Uhrova', N'Vladimira', CAST(0xB30E0B00 AS Date), NULL, NULL, 8, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (47, N'Dobešová', N'Alena', CAST(0x03080B00 AS Date), NULL, NULL, 9, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (48, N'Jelínková', N'Alena', CAST(0x1E0A0B00 AS Date), NULL, NULL, 9, 1)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (49, N'Skácel', N'Bronislav', CAST(0x78F70A00 AS Date), NULL, NULL, 9, 9)
INSERT [dbo].[zamestnanci] ([zam_id], [zam_pri], [zam_jme], [zam_dna], [zam_ti1], [zam_ti2], [odd_id], [zam_sta]) VALUES (50, N'Nguyen Trong', N'Hong', CAST(0xA8030B00 AS Date), NULL, NULL, 9, 1)
SET IDENTITY_INSERT [dbo].[zamestnanci] OFF
ALTER TABLE [dbo].[bydliste]  WITH CHECK ADD  CONSTRAINT [FK_bydliste_adresa] FOREIGN KEY([adr_id])
REFERENCES [dbo].[adresa] ([adr_id])
GO
ALTER TABLE [dbo].[bydliste] CHECK CONSTRAINT [FK_bydliste_adresa]
GO
ALTER TABLE [dbo].[bydliste]  WITH CHECK ADD  CONSTRAINT [FK_bydliste_ciselnik] FOREIGN KEY([cis_id])
REFERENCES [dbo].[ciselnik] ([cis_id])
GO
ALTER TABLE [dbo].[bydliste] CHECK CONSTRAINT [FK_bydliste_ciselnik]
GO
ALTER TABLE [dbo].[bydliste]  WITH CHECK ADD  CONSTRAINT [FK_bydliste_zamestnanci] FOREIGN KEY([zam_id])
REFERENCES [dbo].[zamestnanci] ([zam_id])
GO
ALTER TABLE [dbo].[bydliste] CHECK CONSTRAINT [FK_bydliste_zamestnanci]
GO
ALTER TABLE [dbo].[zamestnanci]  WITH CHECK ADD  CONSTRAINT [FK_zamestnanci_oddeleni] FOREIGN KEY([odd_id])
REFERENCES [dbo].[oddeleni] ([odd_id])
GO
ALTER TABLE [dbo].[zamestnanci] CHECK CONSTRAINT [FK_zamestnanci_oddeleni]
GO
USE [master]
GO
ALTER DATABASE [Podnik] SET  READ_WRITE 
GO
