I'm just trying to run a few queries on a database, however, nothing seems to appear when I run my queries. I log into my database system using:
psql -h HOSTNAME -U USERNAME -d DATABASENAME
That works fine, and I'm onto the database system. However, I get no output in my queries. I typed:
SELECT title AND department
FROM jointnames
WHERE artist = 'John Poit';
I typed that directly after logging in, so that was the whole statement, I don't know if you're meant to include something else along with it to generate the output?
It just comes up blank? Can anyone instruct me on the right way to query a database from a command line?
WHERE artist = 'john poit';postgresql.org/docs/current/static/… Also: string comparison is case sensitive'John Poit'is something different then'john poit'ANDin theSELECTlist would cause that error. Column names should just be separated by commas.