gpt4 book ai didi

MySQL 查询需要 : I need to delete all data from a single column

转载 作者:IT王子 更新时间:2023-10-28 23:45:14 25 4
gpt4 key购买 nike

我目前正在经营一家电子商务商店,大约有 300 种产品的字段名为“product_url”

这些字段包含我需要完全删除的旧 url。

我如何创建一个查询,将所有“product_url”字段中的数据替换为空值?

最佳答案

这会将每个 product_url 设置为 NULL,当前不为空。

UPDATE table_name
SET product_url = NULL
WHERE product_url is not null;

关于MySQL 查询需要 : I need to delete all data from a single column,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4958260/

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