更新操作
- 把所有學生的分數改為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的系統(tǒng)權限相關表
設置好環(huán)境標量后荷并,在cmd終端輸入命令修改密碼
C:\Users\Denve>mysqladmin -u root -p password root;