From Linuxnetworks
Contents |
[edit] ANSI
SQL-92 defines a collection of objects in INFORMATION_SCHEMA which contains the list of available fields for the tables:
SELECT column_name FROM information_schema.columns WHERE table_name = name
[edit] Firebird/Interbase
SELECT RDB$FIELD_NAME FROM RDB$RELATION_FIELDS WHERE RDB$RELATION_NAME = name
[edit] MS SQL Server
Fully compatible with SQL-92.
[edit] MySQL
Fully compatible with SQL-92.
[edit] Oracle
SELECT column_name FROM user_tab_columns WHERE table_name = name ORDER BY column_id
[edit] PostgreSQL
Fully compatible with SQL-92.
[edit] SQLite
Doesn't support retrieving the name of table fields via a SQL statement.
[edit] Sybase ASE
Unknown.

