<div class="iteye-blog-content-contain" style="font-size: 14px"></div>
MYSQL执行如下语句报错:
UPDATE `TDevice` SET `tracker_sim`='',`head_portrait`='',`mobile1`='',`mobile2`='',`mobile3`='',`nickname`='',`timezone`=0,`timezoneid`=31,`gps_interval`=NULL
WHERE id IN ( SELECT a FROM ((SELECT id AS a FROM `TDevice` WHERE id NOT IN (SELECT t.did FROM `TDeviceUser` t LEFT JOIN `TDevice` d ON t.`did`=d.id) AND product_type=14)) AS temp)
报错信息如下:
错误代码: 1093
You can't specify target table 'TDevice' for update in FROM clause
意思是不能在同一语句中更新select出的同一张表元组的属性值
解决方法:将select出的结果通过中间表再select一遍即可。
UPDATE `TDevice` SET `tracker_sim`='',`head_portrait`='',`mobile1`='',`mobile2`='',`mobile3`='',`nickname`='',`timezone`=0,`timezoneid`=31,`gps_interval`=NULL
WHERE id IN (SELECT id AS a FROM `TDevice` WHERE id NOT IN (SELECT t.did FROM `TDeviceUser` t LEFT JOIN `TDevice` d ON t.`did`=d.id) AND product_type=14)
相关推荐
在MySQL数据库操作中,有时会遇到一个特定的错误:1093 - You can’t specify target table for update in FROM clause。这个错误通常发生在尝试在一个`UPDATE`语句的`FROM`子句中直接引用目标更新表时。MySQL不支持...
在MySQL数据库中,"You can’t specify target table for update in FROM clause"是一个常见的错误提示,意味着在同一个SQL语句中,你不能直接在一个`UPDATE`或`DELETE`语句的`FROM`子句中引用你想要更新或删除的表...
### MySQL中“You can’t specify target table for update in FROM clause”错误解决方法 在MySQL数据库管理过程中,遇到SQL语法错误是家常便饭,其中一种较为常见的错误是“You can’t specify target table for ...
在MySQL数据库中,错误代码1093 - "You can’t specify target table ‘t’ for update in FROM clause" 是一个常见的错误,它通常发生在尝试在一个`UPDATE`语句的`FROM`子句中直接引用要更新的目标表时。...
...
错误消息"You can't specify target table 'wms_cabinet_form' for update in FROM clause"清楚地指出,在同一个UPDATE语句中,你不能先从`wms_cabinet_form`表中选择一些值,然后立即更新这个表。 在原始的UPDATE...
mysql 语句如下: update wms_cabinet_form set cabf_enabled=0 where cabf_id in ( SELECT wms_cabinet_form.cabf_id FROM wms_cabinet_form Inner Join wms_cabinet ON wms_cabinet_form.cabf_cab_id = wms_...
在平常的项目中,经常会碰到这样的问题:我需要在一张标中同时更新和查询出来的...结果却报错,报错信息为:You can't specify target table 'tb_test' for update in FROM clause,不能在同一语句中update,select同
bin/postconf: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No such file or directoryPlease specify the final destination directory for installed Postfix ...
--skip-secondary Don't flash secondary slots in flashall/update. --skip-reboot Don't reboot device after flashing. --disable-verity Sets disable-verity when flashing vbmeta. --disable-verification...
Mainly minor improvements and some small bugfixes, but also a new 'ultimap like' feature called Code Filter for which you don't need any special hardware for. (Just an extensive list of addresses) ...
:::tip You can specify an optional title Heads up! Here's a pro-tip. ::: :::info Useful information. ::: :::caution Warning! You better pay attention! ::: :::danger Danger danger, mayday! :::
错误提示是 `ERROR 1093 (HY000): You can't specify target table 'apples' for update in FROM clause.` 这意味着MySQL不允许在 `UPDATE` 语句的 `FROM` 子句中直接引用要更新的表。 解决办法: 尽管MySQL不支持...
For example, SQL Assistant does not insert references to "timestamp" columns in SQL server when generating code for table INSERT and UPDATE statements. Improved control of column name popups. You ...
#### UID-13 (error) '%s' doesn’t specify a unique design **描述**:当指定的设计实体不唯一时,DC 会触发此错误。 **解决步骤**: 1. **完全指定**:确保使用完整的指定方式:全文件名 + 设计名称。 2. **...
mount: you must specify the filesystem type 先执行:mkfs.ext3 /dev/vdb # mkfs.ext3 /dev/vdb mke2fs 1.41.12 (17-May-2010) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 ...
这会导致错误 `[Err] 1093 – You can't specify target table 'a' for update in FROM clause`。MySQL不允许在`SET`或`WHERE`子句中直接引用被更新的表进行子查询。这是因为在执行过程中,MySQL无法确定子查询的...