List all entries in a PostgreSQL datatable
20,324
If I recall correctly, \dt
will show all tables in the database. Anyway, you can type \?
to show available commands.
Selecting every row in a table is just a basic SQL command :
SELECT * FROM your_table;
Related videos on Youtube
Author by
FluxEngine
Updated on October 16, 2020Comments
-
FluxEngine over 3 years
While using the psql in the command line, how do I view all entries in a datatable?
The database name is newproject.
newproject=#
I have tried \l (but this list all the databases)
I am trying to see all the entries in the datatable. I am trying to verify that the test entries I have been putting in from my web app are storing correctly.
-
FluxEngine over 11 years@NeilMcGuigan after figuring this out, I agree it is a beginner question. But while someone is learning, and trying to figure out the lay of the land, your comments aren't helping anyone. I asked this, not because of a sql statement, but I wasn't 100% sure how things work in psql. Thanks for putting a noobie down, hope you feel smart.
-
Erwin Brandstetter over 11 years@user630581:
psql
is the name of the default command line terminal. The name of the RDBMS is PostgreSQL or Postgres for short.
-
-
Arup Rakshit over 9 yearsAnyway, you can type
\?
is what I was looking for. Voted up. -
Victor Lyuboslavsky about 9 years
SELECT * FROM "your_table";
will work. Quotes are needed when your table name is a keyword likeuser