MySQL के लिए:
1) तालिका/फ़ील्ड मेटाडेटा प्राप्त करें
SELECT table_schema, table_name, column_name, ordinal_position, data_type,
numeric_precision, column_type, column_default, is_nullable, column_comment
FROM information_schema.columns
WHERE (table_schema='schema_name' and table_name = 'table_name')
order by ordinal_position;
या
show fields from 'table_name'
2) Foregn Keys संदर्भित तालिका प्राप्त करें
SELECT `REFERENCED_TABLE_NAME`
FROM `information_schema`.`KEY_COLUMN_USAGE`
WHERE
`TABLE_NAME` = 'table_name' AND
`COLUMN_NAME` = 'Column_Name'
3) किसी तालिका के लिए अनुक्रमणिका (प्राथमिक और विदेशी) प्राप्त करें
show keys from `table_name`
5) सभी अनुक्रमणिका और संदर्भित तालिका प्राप्त करें
SELECT *
FROM `KEY_COLUMN_USAGE`
WHERE
`TABLE_NAME` = 'table_name' AND
`TABLE_SCHEMA` = 'schema_name'
या
SELECT *
FROM `REFERENTIAL_CONSTRAINTS`
WHERE
`TABLE_NAME` = 'table_name' AND
`CONSTRAINT_SCHEMA` = 'schema_name'
6) संग्रहित प्रक्रियाएं प्राप्त करें
SELECT *
FROM `ROUTINES`
WHERE
`ROUTINE_SCHEMA` = 'schema_name'
7) ट्रिगर प्राप्त करें
SELECT *
FROM `TRIGGERS`
WHERE
`TRIGGER_SCHEMA` = 'schema_name'
8) ईवेंट प्राप्त करें
SELECT *
FROM `EVENTS`
WHERE
`EVENT_SCHEMA` = 'schema_name'
9) दृश्य प्राप्त करें
SELECT *
FROM `VIEWS`
WHERE
`TABLE_NAME` = 'table_name' AND
`TABLE_SCHEMA` = 'schema_name'