gpt4 book ai didi

mysql - 更新表列mysql

转载 作者:行者123 更新时间:2023-11-29 17:46:21 25 4
gpt4 key购买 nike

我想更新某些列的值,所以我使用了这个简单的查询,但它不起作用,有人可以提出任何建议吗?

UPDATE 'tableA'
SET post_parent = (SELECT wp.ID FROM `tableA` wp
WHERE wp.post_content='' AND wp.post_name='ba' AND wp.post_type='pa')
WHERE ID IN (SELECT ID FROM `tableA` WHERE post_name like '%ba-%' AND post_type='pa')

最佳答案

UPDATE tableA
SET post_parent = (SELECT wp.ID
FROM tableA wp
WHERE wp.post_content=''
AND wp.post_name='ba'
AND wp.post_type='pa')
WHERE ID IN ( SELECT ID
FROM tableA
WHERE post_name
like '%ba-%'
AND post_type='pa')

关于mysql - 更新表列mysql,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49791220/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com