Looking at a table

Started by Paul Ottar Tornesover 23 years ago3 messagesgeneral
Jump to latest
#1Paul Ottar Tornes
critical@tiscali.no

I have a database named "maloy" and within that I have a table named "nyheter"
I can do psql -l to look at all the databases and owners. But is there a way to look at the contents of the table "nyheter" in the database "maloy" ?

Regards
Paul Ottar Tornes

#2Neil Conway
neilc@samurai.com
In reply to: Paul Ottar Tornes (#1)
Re: Looking at a table

"Paul Ottar Tornes" <critical@tiscali.no> writes:

I can do psql -l to look at all the databases and owners. But is
there a way to look at the contents of the table "nyheter" in the
database "maloy" ?

\d nyheter when connected to the "maloy" database, perhaps? If you'd
like to see the SQL that psql uses to produce that info, start psql
with the "-E" flag.

Cheers,

Neil

--
Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC

#3scott.marlowe
scott.marlowe@ihs.com
In reply to: Paul Ottar Tornes (#1)
Re: Looking at a table

On Wed, 30 Oct 2002, Paul Ottar Tornes wrote:

I have a database named "maloy" and within that I have a table named "nyheter"
I can do psql -l to look at all the databases and owners. But is there
a way to look at the contents of the table "nyheter" in the database
"maloy" ?

psql nyheter -c -- 'select * from maloy'

should do it.