I
I
ILoveYAnny2016-06-14 21:14:29
linux
ILoveYAnny, 2016-06-14 21:14:29

How to view the contents of a table with "_" in the name in postgresql on Ubuntu?

Hello, there is a database with the name bd1, it has a table with the name cc_table1 I am
connecting to the database I am
sudo -u postgres psql -d bd1
trying to get the contents

bd1=# select * cc_table1;
ERROR:  syntax error at or near "cc_playlist"
LINE 1: select * cc_playlist;
                         ^

I tried to escape and put quotes ... Please help me get the contents of this table

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Melkij, 2016-06-14
@ILoveYAnny

What makes you think that the problem is in the _ symbol in the title? Are you saying that other similarly syntactically incorrect queries work?
Open any material on SQL and compare with what you wrote.
If you don't see the difference somewhere between the select word and the table name, go for a walk or sleep or something else to do.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question