增 ==》 insert into 库.表(字段名列表) values(值列表); mysql> create table meinvdb.mm( -> id int(4) not null primary key, -> name varchar(18) not null -> ); Query OK, 0 rows affected (0.23 sec)

mysql> insert into meinvdb.mm (id ,name)values (1,"liuyan"),(2,"yangmi"); Query OK, 2 rows affected (0.09 sec) Records: 2 Duplicates: 0 Warnings: 0 改==》 update 表名 set 条件 where 字段名="值" ; mysql> update meinvdb.mm set id=1 where name="bingbing"; Query OK, 0 rows affected (0.00 sec) Rows matched: 0 Changed: 0 Warnings: 0 查==》select 字段列表 from 表名 where 条件表达式列表; mysql> select name from meinvdb.mm where id=2; +--------+ | name | +--------+ | yangmi | +--------+ 1 row in set (0.00 sec) 删==》delete from 表名 where 条件;
mysql> delete from meinvdb.mm where id=1; Query OK, 1 row affected (0.08 sec) mysql> select * from meinvdb.mm; +----+--------+ | id | name | +----+--------+ | 2 | yangmi | +----+--------+