文档介绍: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