UPDATE erp_storehouse
SET storehouse_number = (
SELECT
a.storehouse_number+1
FROM
(
SELECT
storehouse_number
FROM
erp_storehouse
WHERE
storehouse_id = 1
) as a
)
WHERE
storehouse_id = 1
mysql update查询自身数据相加
最新推荐文章于 2024-02-09 17:18:21 发布