Information schema
From Wikipedia, the free encyclopedia
| This article is an orphan, as few or no other articles link to it. Please introduce links to this page from related articles; suggestions are available. (February 2009) |
In relational databases, the information schema is an ANSI standard set of read-only views which provide information about all of the tables, views, columns, and procedures in a database. It can be used as a source of the information which some databases make available through non-standard commands, such as the SHOW command of MySQL and the DESCRIBE command of Oracle.
=> select count(table_name) from information_schema.tables;
count
-------
99
(1 row)
=> select column_name, data_type, column_default, is_nullable
from information_schema.columns where table_name='alpha';
column_name | data_type | column_default | is_nullable
-------------+-----------+----------------+-------------
foo | integer | | YES
bar | character | | YES
(2 rows)
=> select * from information_schema.information_schema_catalog_name;
catalog_name
--------------
johnd
(1 row)
[edit] External links
- Information schema in MySQL
- Information schema in Postgresql
- Information schema in SQLite
- Information schema in Microsoft SQL Server 2005
| This database-related article is a stub. You can help Wikipedia by expanding it. |