-
ALTER TABLE [dbo].[student] WITH CHECK ADD CONSTRAINT [FK_student_class] FOREIGN KEY([classID])
REFERENCES [dbo].[class] ([classID])
ALTER TABLE [dbo].[student] CHECK CONSTRAINT [FK_student_class]
4)teacher表
CREATE TABLE [dbo].[teacher](
[teacherID] [int] NOT NULL,
[name] [nchar](10) NULL,
[sex] [nchar](2) NULL,
[age] [int] NULL,
CONSTRAINT [PK_teacher] PRIMARY KEY CLUSTERED
(
[teacherID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
5)courselist1表
CREATE TABLE [dbo].[courselist1](
[第一节] [nchar](20) NULL,
[第二节] [nchar](20) NULL,
[第三节] [nchar](20) NULL,
[第四节] [nchar](20) NULL,
[第五节] [nchar](20) NULL,
[第六节] [nchar](20) NULL,
[第七节] [nchar](20) NULL,
[第八节] [nchar](20) NULL,
[星期] [nchar](20) NULL
) ON [PRIMARY]
ALTER TABLE [dbo].[courselist1] WITH CHECK ADD CONSTRAINT
[FK_courselist1_course] FOREIGN KEY([第一节])
REFERENCES [dbo].[course] ([coursename])
ALTER TABLE [dbo].[courselist1] CHECK CONSTRAINT [FK_courselist1_course] ALTER TABLE [dbo].[courselist1] WITH CHECK ADD CONSTRAINT
[FK_courselist1_course1] FOREIGN KEY([第二节])
REFERENCES [dbo].[course] ([coursename])
- .
- 总结资料-