Mysql的增删改查语句简单实现

编程学习 2021-07-05 14:36www.dzhlxh.cn编程入门
这篇文章主要介绍了Mysql的增删改查语句简单实现的相关资料,需要的朋友可以参考下

Mysql的增删改查语句简单实现

增加记录:

insert into tablename(...) values(...)
//如果增加的记录包括所有的列,则不需要写数据列表
insert into tablename values(...)

删除记录:

delete from tablename where condition ;

修改记录:

update tablename set xx=xx , xx=xx... where condition ;

alter table tablename set xx=xx , xx=xx... where condition ;

查询记录:

select (...) from tablename where condition ;

select * from tablename where condition ;

删除整个表:

drop table tablename ;

添加列:

alter table tablename add column columnname columntype ... ;

删除列:

alter table tablename drop column columnname ;

感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!

Copyright © 2016-2025 www.dzhlxh.cn 金源码 版权所有 Power by

网站模板下载|网络推广|微博营销|seo优化|视频营销|网络营销|微信营销|网站建设|织梦模板|小程序模板