Received: from anchor-post-31.mail.demon.net (anchor-post-31.mail.demon.net [194.217.242.89]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eBFM0E615421; Fri, 15 Dec 2000 17:00:14 -0500 (EST) (envelope-from olly@lfix.co.uk) Received: from lfix.demon.co.uk ([158.152.59.127] helo=linda.lfix.co.uk) by anchor-post-31.mail.demon.net with esmtp (Exim 2.12 #1) id 1472uB-0004YR-0V; Fri, 15 Dec 2000 22:00:43 +0000 Received: from lfix.co.uk (olly@localhost [127.0.0.1]) by linda.lfix.co.uk (8.11.1/8.11.1/Debian 8.11.0-6) with ESMTP id eBFM0dr15350; Fri, 15 Dec 2000 22:00:39 GMT Message-Id: <200012152200.eBFM0dr15350@linda.lfix.co.uk> X-Authentication-Warning: linda.lfix.co.uk: Host olly@localhost [127.0.0.1] claimed to be lfix.co.uk X-Mailer: exmh version 2.2 06/23/2000 (debian 2.2-1) with nmh-1.0.4+dev X-URL: http://www.lfix.co.uk/oliver X-face: "xUFVDj+ZJtL_IbURmI}!~xAyPC"Mrk=MkAm&tPQnNq(FWxv49R}\>0oI8VM?O2VY+N7@F- KMLl*!h}B)u@TW|B}6 cc: pgsql-general@postgresql.org, "'pgsql-admin@postgresql.org'" Subject: Re: simple questions In-reply-to: Message from Niral Trivedi of Fri, 15 Dec 2000 16:45:25 EST. <328DC4EC2C9B74428D8DAED1931285BF10D95D@FLAN-EXCH01.corp.insage.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 15 Dec 2000 22:00:37 +0000 From: "Oliver Elphick" X-Archive-Number: 200012/111 X-Sequence-Number: 307 Niral Trivedi wrote: >All, > >I have very simple two questions.. > >How can we 'describe a table' and 'view all available tables' in postgres >DB?? > >I am looking for something similar to 'desc ' and 'show tables' in >MySQL or >'desc
' and 'select * from tab' in Oracle.. In psql: \d lists all tables \d table lists all columns in a table use \? for help on psql commands and \h for help on SQL commands Start psql with -E to see the SQL queries that \d produces. -- Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight http://www.lfix.co.uk/oliver PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47 GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C ======================================== "The fear of the LORD is the instruction of wisdom, and before honour is humility." Proverbs 15:33