Update query failing with error : 1175

前端 未结 4 1680
礼貌的吻别
礼貌的吻别 2020-12-07 02:17

I am trying to update a table using the following query

update at_product A join
(
SELECT atbillfields.billeditemguid,count(*) AS numberOfPeopleBought
    ,s         


        
4条回答
  •  一整个雨季
    2020-12-07 02:51

    Have a look at:

    http://justalittlebrain.wordpress.com/2010/09/15/you-are-using-safe-update-mode-and-you-tried-to-update-a-table-without-a-where-that-uses-a-key-column/

    If you want to update without a where key you must execute

    SET SQL_SAFE_UPDATES=0;
    

    right before your query.

    Another option is to rewrite your query o include a key.

提交回复
热议问题