且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在 MySQL Insert 语句中添加 where 子句?

更新时间:2023-01-19 23:39:26

在插入语句中,您不会有一个现有的行来执行 where 子句吗?您正在插入一个新行,您的意思是要执行更新语句吗?

In an insert statement you wouldn't have an existing row to do a where claues on? You are inserting a new row, did you mean to do an update statment?

update users set username='JACK' and password='123' WHERE id='1';