-
Website
http://www.tech-recipes.com/ -
Original page
http://www.tech-recipes.com/rx/279/display-or-show-tables-in-a-postgresqlpgsql-database/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
davak
83 comments · 1 points
-
danishbacker
9 comments · 1 points
-
flexinfo
11 comments · 1 points
-
bej
4 comments · 1 points
-
dimithri
5 comments · 1 points
-
-
Popular Threads
-
Windows 7: How to Prevent the Mouse from Waking your PC
9 hours ago · 1 comment
-
Outlook 2010: Turn Off Attachment Preview
1 week ago · 1 comment
-
Gmail: How to Send SMS Messages Without Using Email
2 weeks ago · 2 comments
-
Windows 7 – Prevent Live Messenger from Opening at Start Up
1 week ago · 1 comment
-
Symfony: Drop Down List Box Without Submit Button
3 weeks ago · 1 comment
-
Windows 7: How to Prevent the Mouse from Waking your PC
select pg_class.relname, pg_attribute.attname, pg_type.typname from pg_class, pg_attribute, pg_type where pg_class.relname = 'YOURTABLENAME' and pg_class.oid = pg_attribute.attrelid and pg_type.oid = pg_attribute.atttypid having attnum > 0
Ivan
SHOW TABLES = d
SHOW DATABASES = l
SHOW COLUMNS = d table
However the * commands only work in psql and not via other interfaces, such as queries via PHP. Similar data can be retrieved with the following SQL commands:
So in the psql console type
l to see the databases,
d ....
SHOW TABLES (d) = SELECT table_name FROM information_schema.tables WHERE table_schema = 'public'
SHOW DATABASES (l) = SELECT datname FROM pg_database;
SHOW COLUMNS FROM table (d table) = SELECT column_name FROM information_schema.columns WHERE table_name ='table';
Check the user comment on this postgre doc. page
http://www.postgresql.org/docs/8.0/interactive/...
<ul id="quote"><h6>none wrote:</h6>Is there any equivalent form for this in SQL?</ul>