开发者

REPLACE INTO SET without specifying column for the values

Can I replace all values on a row using REPLACE开发者_如何转开发 INTO without specifying the specific columns to update like you can on an INSERT INTO?

Example

This works:

REPLACE INTO `product` SET id = 13,`condition`='new'

This doesn't work but I want to do something like this:

REPLACE INTO `product` SET id = 13 VALUES('1','2','3','4','5','6','7','8','9','10','11','12','13','new');


Yes, you can just use the same syntax as for the INSERT INTO case:

REPLACE INTO product SELECT '1','2','3','4','5','6','7','8','9','10','11','12','13','new'
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜