gpt4 book ai didi

sql - UPDATE table_name SET col_name = varchar WHERE col_name is NULL;

转载 作者:行者123 更新时间:2023-11-29 14:27:58 24 4
gpt4 key购买 nike

以下更新失败:-

UPDATE table_name SET col_name = varchar WHERE col_name is NULL;

失败信息是:-

ERROR:  column "varchar" does not exist

而下面提到的成功了:-

UPDATE table_name SET col_name = 889977 WHERE col_name is NULL;

我已经检查了列的 pg_typeof - col_name 是 character varying。请帮忙。

最佳答案

我想你错过了字符串的引用

UPDATE table_name SET col_name = 'varchar' WHERE col_name is NULL;

关于sql - UPDATE table_name SET col_name = varchar WHERE col_name is NULL;,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55677689/

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