更新操作
- 把所有学生的分数改为90
mysql> update students set score=90;
- 把姓名为zs的学生分数改为60
mysql> update students set score=60 where name='zs';
- 把姓名为李四的年龄改为20,分数改为70
mysql> update students set age=30,score=70 where name='ls';
- 把wc的年龄在原来的基础上加1岁
mysql> update students set age=age+1 where name='wc';
mysql> update user set authentication_string=password('root') where user='root' and Host = 'localhost';
mysql> flush privileges; # 刷新Mysql的系统权限相关表
设置好环境标量后,在cmd终端输入命令修改密码
C:\Users\Denve>mysqladmin -u root -p password root;