sqlpostgresqlquoted-identifier

Column doesnot exist error in PostgreSQL command


I have been trying to get the result of a PostgreSQL command. I am getting the following error. I want to get the video id, video name and the created date for that specific video. enter image description here

I have all the required columns in the table as shown below: enter image description here

enter image description here

enter image description here

enter image description here


Solution

  • If you write "tablename.columnname", that is not interpreted as table name and column name, but as a single identifier. Based on the context in a join condition, PostgreSQL expects it to be a column name.

    If you use double quotes, you have to quote column and table separately: "tablename"."columnname"