12

I am new in PostgreSql. I import the database on my linux machine. I am able to see the list of tables using \d command (GSM_test_db-# \d default_msg_details) its displaying the table list but I want to see the table data.

Any Command that shows table Data also Please tell me.

I already used select query GSM_test_db-# SELECT * FROM default_msg_details but its not displaying anything and its not giving any error.

Please tell me if any command or why this select its not displaying anything.

3 Answers 3

23

Because you need to terminate your statement with a ;

Sign up to request clarification or add additional context in comments.

2 Comments

On adding ";", it gives following error message: ERROR: syntax error at or near ";" LINE 1: SELECT * FROM default_table;
I found the answer here. In addition to adding a semicolon, we need to turn off pagination : stackoverflow.com/questions/11180179/…
12

Try SELECT * FROM "default_msg_details";

Beside adding ";" at the end of your query, you also need add the quotes("") to your tabel's name as well.

Comments

1

Firstly, you need to disable pagination but retain the output:

\pset pager off

Then, use the below query:

SELECT * FROM "default_msg_details";

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.