SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[TODEMECIHAZKISIM]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[TODEMECIHAZKISIM](
	[ODEMECIHAZKISIMID] [int] NOT NULL,
	[KISIMADI] [nvarchar](11) NOT NULL,
	[KDV] [int] NOT NULL,
 CONSTRAINT [PK_TODEMECIHAZKISIM] PRIMARY KEY CLUSTERED 
(
	[ODEMECIHAZKISIMID] 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 dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_TODEMECIHAZKISIM_KDV]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[TODEMECIHAZKISIM] ADD  CONSTRAINT [DF_TODEMECIHAZKISIM_KDV]  DEFAULT ((8)) FOR [KDV]
END

GO


