| USE [SCE] |
| GO |
| |
| SET ANSI_NULLS ON |
| GO |
| SET QUOTED_IDENTIFIER ON |
| GO |
| SET ANSI_PADDING ON |
| GO |
| CREATE TABLE [dbo].[学生作业表]( |
| [课程号] [char](10) NOT NULL, |
| [学号] [char](10) NOT NULL, |
| [作业1成绩] [int] NULL, |
| [作业2成绩] [int] NULL, |
| [作业3成绩] [int] NULL, |
| CONSTRAINT [SC_Prim] PRIMARY KEY CLUSTERED |
| ( |
| [课程号] ASC, |
| [学号] 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 |
| SET ANSI_PADDING OFF |
| GO |
| INSERT [dbo].[学生作业表] ([课程号], [学号], [作业1成绩], [作业2成绩], [作业3成绩]) VALUES (N'K001 ', N'0433 ', 60, 75, 75) |
| INSERT [dbo].[学生作业表] ([课程号], [学号], [作业1成绩], [作业2成绩], [作业3成绩]) VALUES (N'K001 ', N'0529 ', 70, 70, 60) |
| INSERT [dbo].[学生作业表] ([课程号], [学号], [作业1成绩], [作业2成绩], [作业3成绩]) VALUES (N'K001 ', N'0531 ', 70, 80, 80) |
| INSERT [dbo].[学生作业表] ([课程号], [学号], [作业1成绩], [作业2成绩], [作业3成绩]) VALUES (N'K001 ', N'0591 ', 80, 90, 90) |
| INSERT [dbo].[学生作业表] ([课程号], [学号], [作业1成绩], [作业2成绩], [作业3成绩]) VALUES (N'K002 ', N'0496 ', 80, 80, 90) |
| INSERT [dbo].[学生作业表] ([课程号], [学号], [作业1成绩], [作业2成绩], [作业3成绩]) VALUES (N'K002 ', N'0529 ', 70, 70, 85) |
| INSERT [dbo].[学生作业表] ([课程号], [学号], [作业1成绩], [作业2成绩], [作业3成绩]) VALUES (N'K002 ', N'0531 ', 80, 80, 80) |
| INSERT [dbo].[学生作业表] ([课程号], [学号], [作业1成绩], [作业2成绩], [作业3成绩]) VALUES (N'K002 ', N'0538 ', 65, 75, 85) |
| INSERT [dbo].[学生作业表] ([课程号], [学号], [作业1成绩], [作业2成绩], [作业3成绩]) VALUES (N'K002 ', N'0592 ', 75, 85, 85) |
| INSERT [dbo].[学生作业表] ([课程号], [学号], [作业1成绩], [作业2成绩], [作业3成绩]) VALUES (N'K006 ', N'0531 ', 80, 80, 90) |
| INSERT [dbo].[学生作业表] ([课程号], [学号], [作业1成绩], [作业2成绩], [作业3成绩]) VALUES (N'K006 ', N'0591 ', 80, 80, 80) |
| INSERT [dbo].[学生作业表] ([课程号], [学号], [作业1成绩], [作业2成绩], [作业3成绩]) VALUES (N'M001 ', N'0496 ', 70, 70, 80) |
| INSERT [dbo].[学生作业表] ([课程号], [学号], [作业1成绩], [作业2成绩], [作业3成绩]) VALUES (N'M001 ', N'0591 ', 65, 75, 75) |
| INSERT [dbo].[学生作业表] ([课程号], [学号], [作业1成绩], [作业2成绩], [作业3成绩]) VALUES (N'S001 ', N'0531 ', 80, 80, 80) |
| INSERT [dbo].[学生作业表] ([课程号], [学号], [作业1成绩], [作业2成绩], [作业3成绩]) VALUES (N'S001 ', N'0538 ', 60, NULL, 80) |
| |
| SET ANSI_NULLS ON |
| GO |
| SET QUOTED_IDENTIFIER ON |
| GO |
| SET ANSI_PADDING ON |
| GO |
| CREATE TABLE [dbo].[学生表]( |
| [学号] [char](10) NOT NULL, |
| [姓名] [char](20) NOT NULL, |
| [性别] [char](2) NOT NULL, |
| [专业班级] [char](50) NOT NULL, |
| [出生日期] [date] NOT NULL, |
| [联系电话] [char](15) NULL, |
| PRIMARY KEY CLUSTERED |
| ( |
| [学号] 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 |
| SET ANSI_PADDING OFF |
| GO |
| INSERT [dbo].[学生表] ([学号], [姓名], [性别], [专业班级], [出生日期], [联系电话]) VALUES (N'0433 ', N'张艳 ', N'女', N'生物04 ', CAST(0x0D110B00 AS Date), N' ') |
| INSERT [dbo].[学生表] ([学号], [姓名], [性别], [专业班级], [出生日期], [联系电话]) VALUES (N'0496 ', N'李越 ', N'男', N'电子04 ', CAST(0x680D0B00 AS Date), N'13812902331 ') |
| INSERT [dbo].[学生表] ([学号], [姓名], [性别], [专业班级], [出生日期], [联系电话]) VALUES (N'0529 ', N'赵欣 ', N'男', N'会计05 ', CAST(0x4D0D0B00 AS Date), N'13502222908 ') |
| INSERT [dbo].[学生表] ([学号], [姓名], [性别], [专业班级], [出生日期], [联系电话]) VALUES (N'0531 ', N'张志国 ', N'男', N'生物05 ', CAST(0x0A110B00 AS Date), N'13312567890 ') |
| INSERT [dbo].[学生表] ([学号], [姓名], [性别], [专业班级], [出生日期], [联系电话]) VALUES (N'0538 ', N'于兰兰 ', N'女', N'生物05 ', CAST(0x650D0B00 AS Date), N'13312004030 ') |
| INSERT [dbo].[学生表] ([学号], [姓名], [性别], [专业班级], [出生日期], [联系电话]) VALUES (N'0591 ', N'王丽丽 ', N'女', N'电子04 ', CAST(0x820D0B00 AS Date), N'13320809766 ') |
| INSERT [dbo].[学生表] ([学号], [姓名], [性别], [专业班级], [出生日期], [联系电话]) VALUES (N'0592 ', N'王海强 ', N'男', N'电子04 ', CAST(0x3E110B00 AS Date), N' ') |
| |
| SET ANSI_NULLS ON |
| GO |
| SET QUOTED_IDENTIFIER ON |
| GO |
| SET ANSI_PADDING ON |
| GO |
| CREATE TABLE [dbo].[课程表]( |
| [课程号] [char](10) NOT NULL, |
| [课程名] [char](50) NOT NULL, |
| [学分数] [float] NOT NULL, |
| [学时数] [int] NOT NULL, |
| [任课老师] [char](20) NOT NULL, |
| PRIMARY KEY CLUSTERED |
| ( |
| [课程号] 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 |
| SET ANSI_PADDING OFF |
| GO |
| INSERT [dbo].[课程表] ([课程号], [课程名], [学分数], [学时数], [任课老师]) VALUES (N'K001 ', N'计算机图形学 ', 2.5, 40, N'胡晶晶 ') |
| INSERT [dbo].[课程表] ([课程号], [课程名], [学分数], [学时数], [任课老师]) VALUES (N'K002 ', N'计算机应用基础 ', 3, 48, N'任泉 ') |
| INSERT [dbo].[课程表] ([课程号], [课程名], [学分数], [学时数], [任课老师]) VALUES (N'K006 ', N'数据结构 ', 4, 64, N'马跃先 ') |
| INSERT [dbo].[课程表] ([课程号], [课程名], [学分数], [学时数], [任课老师]) VALUES (N'M001 ', N'政治经济学 ', 4, 64, N'孔繁新 ') |
| INSERT [dbo].[课程表] ([课程号], [课程名], [学分数], [学时数], [任课老师]) VALUES (N'S001 ', N'高等数学 ', 3, 48, N'赵晓尘 ') |
| |
| ALTER TABLE [dbo].[学生表] ADD DEFAULT ('男') FOR [性别] |
| GO |
| |
| ALTER TABLE [dbo].[学生作业表] WITH CHECK ADD CONSTRAINT [Score_Chk1] CHECK (([作业1成绩]>=(0) AND [作业1成绩]<=(100))) |
| GO |
| ALTER TABLE [dbo].[学生作业表] CHECK CONSTRAINT [Score_Chk1] |
| GO |
| |
| ALTER TABLE [dbo].[学生作业表] WITH CHECK ADD CONSTRAINT [Score_Chk2] CHECK (([作业2成绩]>=(0) AND [作业2成绩]<=(100))) |
| GO |
| ALTER TABLE [dbo].[学生作业表] CHECK CONSTRAINT [Score_Chk2] |
| GO |
| |
| ALTER TABLE [dbo].[学生作业表] WITH CHECK ADD CONSTRAINT [Score_Chk3] CHECK (([作业3成绩]>=(0) AND [作业3成绩]<=(100))) |
| GO |
| ALTER TABLE [dbo].[学生作业表] CHECK CONSTRAINT [Score_Chk3] |
| GO |