如题所述
第1个回答 推荐于2017-10-01
第一个表是学生表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
)本回答被提问者采纳
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
)本回答被提问者采纳
第2个回答 2011-09-14
create table 表名(字段名 类型 约束等等等)