update info set phone=‘12345‘ where name=‘zhangsan‘;
删:
delete from 表名 where 条件 如果没有where条件 删除表中的所有数据
delete from info where id > 1;
delete from info; 删除表中的所有数据
查:
select 字段名 (*) as别名 from 表名 where 条件
select * from info; 查询所有字段的内容
select name,phone from info where id = 1;
去除表中重复记录(只会影响查询的结果 不会修改表中的记录)
select distinct * from 表名;
select distinct name from info; 只显示名字 去除重复的记录
来源: