当前位置:Gxlcms > 数据库问题 > mysql5.7基础 update 更新数据

mysql5.7基础 update 更新数据

时间:2021-07-01 10:21:17 帮助过:9人阅读

礼悟:
     公恒学思合行悟,尊师重道存感恩。叶见寻根三返一,江河湖海同一体。
          虚怀若谷良心主,愿行无悔给最苦。读书锻炼养身心,诚劝且行且珍惜。


 

 

  数据、数据,命根就在数据。操作数据库一定要谨慎小心。给最苦 这里的代码,看看就好,要有自己的判断。遇到抉择,要不耻上下问。 
               mysql:5.7
                     os:Windows7 x64

 

 

代码及效果

mysql> select * from t1;
+------+--------+
| id   | name   |
+------+--------+
|    1 | Hello  |
|    2 | World  |
| NULL | 未登记 |
|    3 | 未登记 |
|  100 | 未登记 |
+------+--------+
5 rows in set (0.00 sec)


mysql> update t1 set id=4 where name=‘Hello‘;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0


mysql> select * from t1;
+------+--------+
| id   | name   |
+------+--------+
|    4 | Hello  |
|    2 | World  |
| NULL | 未登记 |
|    3 | 未登记 |
|  100 | 未登记 |
+------+--------+
5 rows in set (0.00 sec)

  

    


mysql,关系型数据库管理系统,优秀,值得学习。
学习资源:itcast和itheima视频库 + 清净的心地。
如果您有公开的资源,可以分享给我的话,用您的资源学习也可以。
博文是观看视频后,融入思考写成的。博文好,是老师讲得好。博文坏,是 给最苦 没认真。

mysql5.7基础 update 更新数据

标签:update   系统   div   post   cte   body   blog   关系   珍惜   

人气教程排行