USE [TEST] GO /****** Object: Table [dbo].[SC] Script Date: 2022/10/30 23:57:31 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[SC]( [Sno] [int] NOT NULL, [Cno] [int] NOT NULL, [Grade] [int] NULL, CONSTRAINT [PK_SC] PRIMARY KEY CLUSTERED ( [Sno] ASC, [Cno] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY] ) ON [PRIMARY] GO ALTER TABLE [dbo].[SC] WITH CHECK ADD CONSTRAINT [FK_SC_Course] FOREIGN KEY([Cno]) REFERENCES [dbo].[Course] ([Cno]) GO ALTER TABLE [dbo].[SC] CHECK CONSTRAINT [FK_SC_Course] GO ALTER TABLE [dbo].[SC] WITH CHECK ADD CONSTRAINT [FK_SC_Student] FOREIGN KEY([Sno]) REFERENCES [dbo].[Student] ([Sno]) GO ALTER TABLE [dbo].[SC] CHECK CONSTRAINT [FK_SC_Student] GO