Foreplay - Create a table
create table xxx(
id int unsigned not null auto_increment primary key,
name varchar(20) not null
);
1. increase
- the whole field into
insert into xxx values (0, "catch");
- field interpolation
insert into xxx (name) values ( "Wang Lao six");
- Multi-row insert
insert into xxx (name) values ( "Wang Lao six"), ( "King Seven"), ( "Wang eight");
2. deleted
delete from xxx where id=1;
3. change
update xxx set name="张三", where id=3;
4 check
select * from xxx; to see all data
select *from xxx where id>3;
select * from xxx where name = "Wong Lo Six";