I'm a longtime GUI user trying to switch to command line, and I'm not sure how to execute an SQL statement from the Ubuntu command line. I'm using postgres. I can use
\c to connect to the database and
\d to see the tables in it. I can also see the headers with
\d dbname (where
dbname is the name of the database). What I can't do is see the actual data.
SELECT * FROM dbname; and I got a "syntax error at or near dbname". I Tried it without the semi colon, and just got a new command line. How do I see my data? Thanks in advance.