IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSOBJECTS.name = 'HSENCARDDOKUMAN')
CREATE TABLE [dbo].[HSENCARDDOKUMAN](
	[ID] [int] NOT NULL,
	[HDOSYAID] [int] NULL,
	[CLAIMID] [int] NULL,
	[FILENAME] [nvarchar](500) NULL,
	[FILEPATH] [nvarchar](500) NULL,
	[DOCUMENTSTREAM] [ntext] NULL,
	[DOCUMENTEXTTYPE] [nvarchar](10) NULL,
	[DOCUMENTTYPEID] [int] NULL,
	[EFATURAETTN] [nvarchar](38) NULL,
	[CUSTOMERID] [int] NULL,
	[KYTARIH] [datetime] NULL,
	[KYKULLANICI] [nvarchar](50) NULL,
	[SGTARIH] [datetime] NULL,
	[SGKULLANICI] [nvarchar](50) NULL,
 CONSTRAINT [PK_HSENCARDDOKUMAN] PRIMARY KEY CLUSTERED 
(
	[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


