Correcting teacher:PHPz
Correction status:qualified
Teacher's comments:
/* mysql 常用DDL DML */
/*
DML:
insert,delete,update,select等
*/
/* 添加数据 */
INSERT into users(uname,pwd,updata_time) VALUE('zhangsan','e10adc3949ba59abbe56e057f20f883e','1629358407');
INSERT into users(id,uname,pwd,updata_time) VALUE(2,'lisi','e10adc3949ba59abbe56e057f20f883e','1629358407');
INSERT into users(uname,pwd,updata_time) VALUE('wangwu','e10adc3949ba59abbe56e057f20f883e','1629358407');
INSERT into users(uname,pwd,updata_time) VALUE('daming','e10adc3949ba59abbe56e057f20f883e','1629358407');
INSERT into users(uname,pwd,updata_time) VALUE('xiaoming','e10adc3949ba59abbe56e057f20f883e','1629358407');
/* 删除数据 删除数据一定要带上where 条件,否则就准备跑路吧*/
delete from users where uname = 'lisi';
/* 更新数据 */
update users set uname = 'wangwu222' where uname = 'wangwu';
/* 查询数据 */
select id,uname,create_time,updata_time from users where id >= 3;
/*
DDL:
databse,table等
*/
/* 创建数据库 */
create database test default character set utf8mb4 -- UTF-8 Unicode collate utf8mb4_unicode_ci;
/* 删除数据库 */
drop database test;
/* 显示已存在的数据库 */
show databases;