IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'HYATISDUSMEONLEM')
BEGIN
CREATE TABLE [dbo].[HYATISDUSMEONLEM](
	[DUSMEONLEMID] [int] IDENTITY(1,1) NOT NULL,
	[HYATISID] [int] NOT NULL,
	[YATAKKENARKALDIRILDI] [bit] NOT NULL,
	[SIKTAKIP] [bit] NOT NULL,
	[YATAKZEMINEYAKIN] [bit] NOT NULL,
	[YATAKFRENKITLENDI] [bit] NOT NULL,
	[HEMSIREDESKYAKIN] [bit] NOT NULL,
 CONSTRAINT [PK_HYATISDUSMEONLEM] PRIMARY KEY CLUSTERED 
(
	[DUSMEONLEMID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]


	ALTER TABLE [dbo].[HYATISDUSMEONLEM] ADD  CONSTRAINT [DF_HYATISDUSMEONLEM_YATAKKENARKALDIRILDI]  DEFAULT ((0)) FOR [YATAKKENARKALDIRILDI]

	ALTER TABLE [dbo].[HYATISDUSMEONLEM] ADD  CONSTRAINT [DF_HYATISDUSMEONLEM_SIKTAKIP]  DEFAULT ((0)) FOR [SIKTAKIP]

	ALTER TABLE [dbo].[HYATISDUSMEONLEM] ADD  CONSTRAINT [DF_HYATISDUSMEONLEM_YATAKZEMINEYAKIN]  DEFAULT ((0)) FOR [YATAKZEMINEYAKIN]

	ALTER TABLE [dbo].[HYATISDUSMEONLEM] ADD  CONSTRAINT [DF_HYATISDUSMEONLEM_YATAKFRENKITLENDI]  DEFAULT ((0)) FOR [YATAKFRENKITLENDI]

	ALTER TABLE [dbo].[HYATISDUSMEONLEM] ADD  CONSTRAINT [DF_HYATISDUSMEONLEM_HEMSIREDESKYAKIN]  DEFAULT ((0)) FOR [HEMSIREDESKYAKIN]

END


