Mysql的增删改查语句

来源:互联网 发布:织梦 查询语句 编辑:程序博客网 时间:2024/06/06 20:44

增加记录:

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 ;
0 0
原创粉丝点击