这篇文章主要介绍了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 ;
以上就是Mysql基本语句——增删改查的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号