gpt4 book ai didi

SQL WHERE - 列(值)不存在

转载 作者:行者123 更新时间:2023-12-03 20:29:24 25 4
gpt4 key购买 nike

这个问题在这里已经有了答案:





delete "column does not exist"

(1 个回答)



Column 'mary' does not exist

(2 个回答)



postgres - where in (list) - column does not exist

(2 个回答)



Why does Postgres say column does not exist? [duplicate]

(1 个回答)


2年前关闭。




我正在尝试在 psql 中执行最基本的 WHERE 语句,但出现一个奇怪的错误:

ERROR:  column "rom_tut" does not exist
LINE 1: SELECT * FROM pg_roles WHERE rolname="rom_tut";

为什么提示该值不是列?

最佳答案

对字符串值使用单引号,因为双引号表示列名

SELECT * FROM pg_roles WHERE rolname='rom_tut'

关于SQL WHERE - 列(值)不存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52988233/

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