delete “column does not exist”

后端 未结 1 376
无人共我
无人共我 2020-11-28 16:53

I\'m trying to execute a very simple delete query in Postgres

Query:

delete from \"Tasks\" where id = \"fc1f56b5-ff41-43ed-b27c-39eac9354323\";


        
相关标签:
1条回答
  • 2020-11-28 17:28

    The problem is that you are using double quotes (") and single quotes (') interchangeably. SQL treats what's inside double quotes "" as an identifier (i.e., table name, proc name, column name, etc.), character constants need to be enclosed in single quotes

    You can say:

    delete from "Tasks" where id = 'fc1f56b5-ff41-43ed-b27c-39eac9354323'
    
    0 讨论(0)
提交回复
热议问题