参考 : https://stackoverflow.com/a/9589124
UPDATE R
SET R.status = '0'
FROM dbo.ProductReviews AS R
INNER JOIN dbo.products AS P
ON R.pid = P.id
WHERE R.id = '17190'
AND P.shopkeeper = '89137';
这是一个SQL查询示例,用于更新ProductReviews表中id为17190且shopkeeper为89137的产品评论状态,将其设置为'0'。此查询使用了INNER JOIN操作连接ProductReviews和products表,确保更新操作基于正确的商品。
参考 : https://stackoverflow.com/a/9589124
UPDATE R
SET R.status = '0'
FROM dbo.ProductReviews AS R
INNER JOIN dbo.products AS P
ON R.pid = P.id
WHERE R.id = '17190'
AND P.shopkeeper = '89137';

被折叠的 条评论
为什么被折叠?