mysql> insert into user values(2,‘ruzhaocheng’,‘123456’,‘young’); //插入数据
mysql> insert into user(id,username,password,conidition)
values(3,‘zhangziqiang’,‘123456’,‘young’); //插入数据
mysql> insert into user
(id,username,password,conidition)values(6,‘laolizi’,‘2222’,‘old’),(7,‘laoli’,‘2222’,‘old’);//多条插入
mysql> delete from user where id =6; //删除,整条数据全部删除 //不加where将删除全部数
据
mysql> update user set id =5 where id =7; //更改数据
mysql> update user set username =‘wwww’,password = ‘13579’,conidition = ‘child’ where id =4;//更改多项数据
mysql> select *from user; //显示数据 user是表名 查询所有信息;
mysql> select username from user; //查询指定数据
mysql> select username,password from user; //查询多个指定数据
mysql> select distinct password from user; //去除查询过程中的重复值
mysql> select * from user where id =1; //查询整行信息
mysql> select * from user where id >3; // 查询id大于2的整行信息