第一個表是學生表Student,包含三個欄位,學生id(stu_id) 和 學生姓名(stu_name)和課程id(les_id)Create Table [dbo].Student(stu_id [uniqueidentifier] NOT NULL,stu_name [nvarchar](425) NOT NULL,les_id [uniqueidentifier] NOT NULL)第二個表課程表Lesson,兩個欄位,課程id(les_id)和課程名稱(les_name)Create Table [dbo].Lesson(les_id [uniqueidentifier] NOT NULL,les_name [nvarchar](425) NOT NULL)第三個表學生成績表Score,三個欄位課程id(les_id),學生id(stu_id)和課程得分(les_score)Create Table [dbo].Score(les_id [uniqueidentifier] NOT NULL,stu_id [uniqueidentifier] NOT NULL,les_score [int] NOT NULL)
第一個表是學生表Student,包含三個欄位,學生id(stu_id) 和 學生姓名(stu_name)和課程id(les_id)Create Table [dbo].Student(stu_id [uniqueidentifier] NOT NULL,stu_name [nvarchar](425) NOT NULL,les_id [uniqueidentifier] NOT NULL)第二個表課程表Lesson,兩個欄位,課程id(les_id)和課程名稱(les_name)Create Table [dbo].Lesson(les_id [uniqueidentifier] NOT NULL,les_name [nvarchar](425) NOT NULL)第三個表學生成績表Score,三個欄位課程id(les_id),學生id(stu_id)和課程得分(les_score)Create Table [dbo].Score(les_id [uniqueidentifier] NOT NULL,stu_id [uniqueidentifier] NOT NULL,les_score [int] NOT NULL)