How to fix PostgreSQL saying "relation does not exist"
A quick explanation of how to solve PostgreSQL saying relation does not exist
React Masterclass
Launching on November 4th
If you have a PostgreSQL database and a table named Car for example and you try doing
SELECT * FROM Caryou’ll see an error saying
Query 1 ERROR: ERROR:  relation "car" does not exist
LINE 1: SELECT * FROM CarOne issue might be the table actually does not exist.
But if it does, this error appears because PostgreSQL raises errors on tables with mixed cases.
Use this syntax instead:
SELECT * FROM "Car"I wrote 20 books to help you become a better developer:
- JavaScript Handbook
- TypeScript Handbook
- CSS Handbook
- Node.js Handbook
- Astro Handbook
- HTML Handbook
- Next.js Pages Router Handbook
- Alpine.js Handbook
- HTMX Handbook
- React Handbook
- SQL Handbook
- Git Cheat Sheet
- Laravel Handbook
- Express Handbook
- Swift Handbook
- Go Handbook
- PHP Handbook
- Python Handbook
- Linux/Mac CLI Commands Handbook
- C Handbook