1. 程式人生 > >1.SQL--創建學生表和向學生表插入數據

1.SQL--創建學生表和向學生表插入數據

插入數據 datetime arch insert etime tab 5-0 eat name

--新建學生表
create table Student(
Sid varchar(10),
Sname nvarchar(10),
Sage datetime,
Ssex nvarchar(10)
)
--向學生表添加數據
insert into Student values(‘01‘,‘張磊‘,‘1995-02-08‘,‘男‘)
insert into Student values(‘02‘,‘李華‘,‘1995-06-11‘,‘男‘)
insert into Student values(‘03‘,‘王青‘,‘1996-01-06‘,‘男‘)
insert into Student values(‘04‘,‘李娟‘,‘1995-04-18‘,‘女‘)
insert into Student values(‘05‘,‘劉曉‘,‘1996-11-02‘,‘女‘)
insert into Student values(‘06‘,‘趙勇‘,‘1995-09-21‘,‘男‘)
insert into Student values(‘07‘,‘胡一刀‘,‘1995-07-17‘,‘男‘)
insert into Student values(‘08‘,‘羅莉‘,‘1995-10-14‘,‘女‘)
insert into Student values(‘09‘,‘蔡輝‘,‘1995-06-25‘,‘男‘)
insert into Student values(‘10‘,‘沈晨‘,‘1996-05-14‘,‘女‘)

1.SQL--創建學生表和向學生表插入數據