@Chiang
2019-09-18T20:21:15.000000Z
字数 491
阅读 631
MySQL
# 插入单条数据
insert into table_name (column_list) values (value_list);
# 插入多条数据
insert into table_name (column_list) values (value_list1), (value_list2), ..., (value_listn);
# 把查询结果插入到表中
insert into table_name1 (column_list1) select (column_list2) from table_name2 where (condition);
update table_name
set column_name1 = value1, column_name2 = value2, ..., column_namen = valuen
where (condition);
# delete
delete from table_name [where <condition>];
# truncate 删除表中所有记录 (删除表重新创建表)
truncate table table_name;
参考资料:
MySQL5.7从入门到精通