我希望通过选择其status的requisition_id来更改单个订单的status,其中status匹配特定的关键字。但是它不断地向我显示这个错误“您不能为更新指定目标表”FROM子句SET status ='Approved'
WHERE requisition_no IN (SELECT requisition_no FROM order_info
我为MySQL 5.5编写的一些查询不再适用于MySQL 5.7。我不确定是否有配置设置..。以下查询不再有效: Select * From ( Select* from Tablex a where a.StartTime > :Start and a.EndTime <:end ) as DerivedTable1/
在我的notes表(MySQL数据库)中,我的主键是id。我希望列originalid是主键的值。下面是我在创建一个我认为可以工作的记录之后运行的查询。UPDATE notes SET originalid = (SELECT MAX(id) FROM notes) where id = (SELECT MAX(id) FROM notes);
但我明白错误不能为