在這個查詢我想更新那些記錄是最新posted.But我的這個查詢不工作請幫我什麼原因?爲什麼更新和選擇兩個不工作在同一個表
錯誤: - 您不能指定目標表 'beevers_products' 的更新在FROM子句
update beevers_products set product_name='my_product_name' where posted_date in (SELECT posted_date FROM `beevers_products` order by posted_date asc limit 1)
在MySQL中,你不能修改您在SELECT部分使用相同的表。檢查這個鏈接。 http://stackoverflow.com/questions/45494/mysql-error-1093-cant-specify-target-table-for-update-in-from-clause – cartina 2013-02-19 10:11:29
你能解釋一下你想做什麼嗎?這個查詢似乎是inlogical bit – Shaolin 2013-02-19 10:13:23