一楼代码小宝宝来了都会做了
create database stusys;
use stusys;
create table student
(
sno char(6) not null primary key comment '学号',
sname char(8) not null comment '姓名',
ssex char(20) not null default '男' comment '性别',
sbirthdat date not null comment '出生日期',
speciality char(12) null comment '专业',
tc tinyint null comment '总学分'
);
create table student1 like student;
desc student1;
insert into student1
values
('196001','董明霞','女','1999-05-02','通信',50);
select *from student1;
insert into student1 (sno,sname,speciality,tc,ssex,sbirthdat)
values
('196002','李茜','通信','48','女','1998-07-25');
select *from student1;
insert into student1 (sno,sname,sbirthdat,tc)
values
('196004','周俊文','1998-03-10',52);
select *from student;
replace into student1
values
('196002','李茜','女','1998-07-25','通信',48);
create table student2 like student;
insert into student2
select *from student;
select *from student2;
use stusys;
#安全模式更新;
set sql_safe_updates=0;
update student1
set sbirthdat ='1999-03-10'
where sname ='周俊文';
select *from student1;
select *from student;
update student1
set tc = tc+2;
select *from student1;
delete from student1
where sno='196004';
delete from student1;
truncate student;
select *from student;
底楼效果图