官术网_书友最值得收藏!

UPDATE

The UPDATE statement modifies existing data in the database. You must specify a condition for the UPDATE command as otherwise, it will modify every single piece of data in a table, which is not our intended behavior. Try the following command, which will change the username and password of the first user:

UPDATE user SET username = "test1", password = "1234321" WHERE id = 1;

The command will fail, however, if the user with ID 1 does not exist. The command will also return the status 0 rows affected if the username and password data you provided matches exactly with the one stored in the database (nothing to change). For more information regarding the UPDATE statement, please refer to the following link:

 https://dev.mysql.com/doc/refman/5.7/en/update.html

主站蜘蛛池模板: 沅陵县| 东台市| 新津县| 子洲县| 棋牌| 道孚县| 湘潭市| 大化| 南召县| 左权县| 莲花县| 曲周县| 汝阳县| 尉犁县| 邳州市| 乐业县| 台北市| 镇赉县| 平阳县| 井冈山市| 绿春县| 汽车| 长子县| 上饶县| 滕州市| 视频| 九江县| 新乡市| 兖州市| 张家界市| 墨竹工卡县| 韶关市| 广丰县| 绥滨县| 唐山市| 东乌珠穆沁旗| 金门县| 禹城市| 宁陵县| 左云县| 固安县|