IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[HYDOGUMMUAYENETAKIBI]') AND type in (N'U'))
BEGIN

CREATE TABLE [dbo].[HYDOGUMMUAYENETAKIBI](
	[GENMUYID] [int] NOT NULL,
	[TARIH] [datetime] NULL,
	[HYATISID] [int] NULL,
	[VULGA] [nvarchar](50) NULL,
	[VAGEN] [nvarchar](50) NULL,
	[COLLUM] [nvarchar](50) NULL,
	[POCHE] [nvarchar](50) NULL,
	[CKS] [nvarchar](50) NULL,
	[ONDEGELENKISIM] [nvarchar](50) NULL,
	[SPID] [int] NULL,
	[MUAYENEDRID] [int] NULL,
	[STRKONTRAKSIYON] [int] NULL,
	[STRAMNIONMAYI] [nvarchar](10) NULL,
	[STRODENGELENKISIM] [nvarchar](10) NULL,
	[STRILACLAR] [nvarchar](20) NULL,
	[STRCKS] [nvarchar](10) NULL,
	[STRCOLLUMNEFASMAN] [nvarchar](10) NULL,
	[STRCOLLUMDILATASYON] [nvarchar](10) NULL,
	[KYTTARIHI] [datetime] NULL,
	[KYTKULLANICI] [nvarchar](25) NULL,
 CONSTRAINT [PK_HYDOGUMMUAYENETAKIBI] PRIMARY KEY CLUSTERED 
(
	[GENMUYID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

END
GO

IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[HYDOGUMMUAYENETAKIBI]') AND 
name = N'IX_HYDOGUMMUAYENETAKIBI_HYATISID')

CREATE NONCLUSTERED INDEX [IX_HYDOGUMMUAYENETAKIBI_HYATISID] ON [dbo].[HYDOGUMMUAYENETAKIBI]
(
	[HYATISID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO