-
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
-
Web Design
3 comments · 1 points
-
danishbacker
9 comments · 1 points
-
flexinfo
11 comments · 1 points
-
Tonychelle
4 comments · 1 points
-
-
Popular Threads
-
Facebook: How To Get Only Status Updates on Your FB Home Page
1 week ago · 4 comments
-
Firefox: Enable Case Sensitive Searches When Using Find (Ctrl+F)
5 days ago · 1 comment
-
Windows 7: How To Disable Live Preview for Taskbar Thumbnails
2 weeks ago · 2 comments
-
Gmail: How to block a sender from your inbox
3 weeks ago · 3 comments
-
Our first iPhone game GreenThumb available in the App Store
4 weeks ago · 2 comments
-
Facebook: How To Get Only Status Updates on Your FB Home Page
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>