增删改

# INSERT(单条,字符和日期型数据应包含在单引号中。)
insert into aa(name, qq) value('dd','500');

#   从其它表中拷贝数据
insert into aa(name)
(select name from user where id=2);

# 更新数据
update aa set name='ee' where id=5;

#更新多表数据
update user right join aa
on user.counts=aa.lo
set lo=300 where counts=100;

# 回滚数据
SET AUTOCOMMIT = FALSE;

# 删除数据
delete from aa where id=6;

#删除全部数据
truncate table user;

 

上一篇:D. Martial Arts Tournament


下一篇:前端鄙视题