s
sreelu 123

Posted on 27th April 2024|6686 views

0
votes

Postgresql Relation Does Not Exist

Why do we get "Relation does not exist" in PostgreSQL?

Answers
P
Altaf syed

Posted on 27th April 2024

This (programming error ) does not exist when you give a keyword that does not exist in the column you provide in the PostgreSQL database.

For example:

SELECT name_of_column 

FROM my_schema.columns 

WHERE name_of_table="my_database";

The name of table my_database referencing a column in my_schema does not exist because you need to add CREATE TABLE statement to create a table.

Now by adding the statement below, we can make sure that we don’t get this comment relation does not exist.

SELECT *

FROM public <schema>."my_database"

 

Write your answer

STILL GOT QUERIES?

Get a Live FREE Demo
  • Explore the trending and niche courses and learning maps
  • Learn about tuition fee, payment plans, and scholarships
  • Get access to webinars and self-paced learning videos