1 / 9
文档名称:

SQL第四章课后习题答案.docx

格式:docx   大小:18KB   页数:9页
下载后只包含 1 个 DOCX 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

SQL第四章课后习题答案.docx

上传人:xxj16588 2017/12/16 文件大小:18 KB

下载得到文件列表

SQL第四章课后习题答案.docx

文档介绍

文档介绍:USE student
GO
CREATE TABLE stud_info
( stud_id CHAR(10) NOT NULL,
name NVARCHAR(4) NOT NULL,
birthday DATETIME,
gender NCHAR(1),
address NVARCHAR(20),
telcode CHAR(12),
zipcode CHAR(6),
mark DECIMAL(3,0)
)
--1、利用资源管理器创建表
--2.、删除表和创建表
use student
go
drop table stud_info
go
use student
go
drop table classroom_info
go
use student
go
drop table dept_code
go
use student
go
drop table lesson_info
go
use student
go
drop table specialty_code
go
use student
go
drop table staffroom_info
go
use student
go
drop table stud_grade
go
use student
go
drop table teacher_info
go
use student
go
drop table teacher_schedule
go
USE student
GO
CREATE TABLE stud_info
( stud_id CHAR(10) NOT NULL,
name NVARCHAR(4) NOT NULL,
birthday DATETIME,
gender NCHAR(1),
address NVARCHAR(20),
telcode CHAR(12),
zipcode CHAR(6),
mark DECIMAL(3,0)
)
USE student
GO
CREATE TABLE teacher_info
( teacher_id CHAR(10) NOT NULL,
name NVARCHAR(4) NOT NULL,
gender NCHAR(1),
age int,
tech_title nchar(5),
telephone varchar(12),
salary decimal(7),
course_id char(10)
)
use student
go
create table stud_grade
(stud_id char(10) not null,
name nvarchar(4) not null,
course_id char(10),
grade numeric(4)
)
use student
go
create table lesson_info
(course_id char(10) not null,
course_name nvarchar(12) not null,
course_type