USE [TEDPortal] GO /****** Object: Table [degerleme].[TekYillikFiiliKullanim] Script Date: 29.11.2021 11:07:58 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [degerleme].[TekYillikFiiliKullanim]( [Id] [int] IDENTITY(1,1) NOT NULL, [TekYillikUrunId] [int] NOT NULL, [Y1_U1_UrunId] [int] NULL, [Y1_U2_UrunId] [int] NULL, [Y2_U1_UrunId] [int] NULL, [Y2_U2_UrunId] [int] NULL, [Y3_U1_UrunId] [int] NULL, [Y3_U2_UrunId] [int] NULL, [AktifMi] [int] NOT NULL, CONSTRAINT [PK_TekYillikFiiliKullanim] 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 ALTER TABLE [degerleme].[TekYillikFiiliKullanim] WITH CHECK ADD CONSTRAINT [FK_TekYillikFiiliKullanim_TekYillikUrun] FOREIGN KEY([TekYillikUrunId]) REFERENCES [degerleme].[TekYillikUrun] ([Id]) GO ALTER TABLE [degerleme].[TekYillikFiiliKullanim] CHECK CONSTRAINT [FK_TekYillikFiiliKullanim_TekYillikUrun] GO ALTER TABLE [degerleme].[TekYillikFiiliKullanim] WITH CHECK ADD CONSTRAINT [FK_TekYillikFiiliKullanim_Urun1] FOREIGN KEY([Y1_U1_UrunId]) REFERENCES [degerleme].[Urun] ([Id]) GO ALTER TABLE [degerleme].[TekYillikFiiliKullanim] CHECK CONSTRAINT [FK_TekYillikFiiliKullanim_Urun1] GO ALTER TABLE [degerleme].[TekYillikFiiliKullanim] WITH CHECK ADD CONSTRAINT [FK_TekYillikFiiliKullanim_Urun2] FOREIGN KEY([Y1_U2_UrunId]) REFERENCES [degerleme].[Urun] ([Id]) GO ALTER TABLE [degerleme].[TekYillikFiiliKullanim] CHECK CONSTRAINT [FK_TekYillikFiiliKullanim_Urun2] GO ALTER TABLE [degerleme].[TekYillikFiiliKullanim] WITH CHECK ADD CONSTRAINT [FK_TekYillikFiiliKullanim_Urun3] FOREIGN KEY([Y2_U1_UrunId]) REFERENCES [degerleme].[Urun] ([Id]) GO ALTER TABLE [degerleme].[TekYillikFiiliKullanim] CHECK CONSTRAINT [FK_TekYillikFiiliKullanim_Urun3] GO ALTER TABLE [degerleme].[TekYillikFiiliKullanim] WITH CHECK ADD CONSTRAINT [FK_TekYillikFiiliKullanim_Urun4] FOREIGN KEY([Y2_U2_UrunId]) REFERENCES [degerleme].[Urun] ([Id]) GO ALTER TABLE [degerleme].[TekYillikFiiliKullanim] CHECK CONSTRAINT [FK_TekYillikFiiliKullanim_Urun4] GO ALTER TABLE [degerleme].[TekYillikFiiliKullanim] WITH CHECK ADD CONSTRAINT [FK_TekYillikFiiliKullanim_Urun5] FOREIGN KEY([Y3_U1_UrunId]) REFERENCES [degerleme].[Urun] ([Id]) GO ALTER TABLE [degerleme].[TekYillikFiiliKullanim] CHECK CONSTRAINT [FK_TekYillikFiiliKullanim_Urun5] GO ALTER TABLE [degerleme].[TekYillikFiiliKullanim] WITH CHECK ADD CONSTRAINT [FK_TekYillikFiiliKullanim_Urun6] FOREIGN KEY([Y3_U2_UrunId]) REFERENCES [degerleme].[Urun] ([Id]) GO ALTER TABLE [degerleme].[TekYillikFiiliKullanim] CHECK CONSTRAINT [FK_TekYillikFiiliKullanim_Urun6] GO