This article mainly introduces the relevant information about the simple implementation of Mysql's add, delete, modify and query statements. Friends in need can refer to
The simple implementation of Mysql's add, delete, modify and query statements
Add record:
insert into tablename(...) values(...) //如果增加的记录包括所有的列,则不需要写数据列表 insert into tablename values(...)
Delete record:
delete from tablename where condition ;
Modify records:
update tablename set xx=xx , xx=xx... where condition ; alter table tablename set xx=xx , xx=xx... where condition ;
Query records:
select (...) from tablename where condition ; select * from tablename where condition ;
Delete the entire table:
##
drop table tablename ;
Add a column:
alter table tablename add column columnname columntype ... ;
Delete column:
alter table tablename drop column columnname ;
The above is the detailed content of Mysql basic statements - add, delete, modify and query. For more information, please follow other related articles on the PHP Chinese website!