S
S
San4es1231232021-01-12 22:11:36
SQL
San4es123123, 2021-01-12 22:11:36

How to open a table in a database?

I entered the database as a user, I need to see the contents of the "Couriers" table, I view the contents of the database with the \dt command.
Then I made a simple SQL query - SELECT * FROM Couriers; and gives an error - ERROR: relation "couriers" does not exist
5ffdf464cf0fa366020564.jpeg

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Melkij, 2021-01-12
@San4es123123

Obviously psql on the screen, respectively postgresql.
The command line prompt -# indicates that this is no longer the beginning of a query, but that you have already typed something earlier. And psql thinks that you are writing the query further, then sends it in its entirety. Commands from psql itself are treated in the same way.
LINE 2 says the same thing.
According to the tables - pay attention to the register . from couriers and from couriers refer to the couriers table. A case-sensitive name is syntactically different by the standard.

G
galaxy, 2021-01-12
@galaxy

Where are you copying the request from?
You have SELECT - the second line, before it - something non-printable. Beat with your hands.

A
Alexander, 2021-01-12
@Alexandre888

USE название_БД

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question