The fifth Chapter Metadata query query database itself Information table structure index, etc.
5.1 Querying all table information under the test library
Mysql
from ' Test ';
ORACLE
Select from where ' Test ';
5.2 Querying the information for columns in a table
Mysql
SELECT * from WHERE = ' Test ' and = ' Student ';
ORACLE
Select * from where = ' Test ' and = ' Student ';
5.3 List Indexes of tables
Mysql
Index from EMP;
ORACLE
Select from where = ' EMP ' and = ' Test ';
5.4 Listing table constraints
ORACLE
Select from where = ' EMP ' and = ' Test ' and = and = and = b.constraint_name;
Mysql
select A.table_name,a.constraint_name,b.coulumn_name,a.constraint_ Type from information_schema.table_constraints A,information_schema.key_ Column_usage b where a.table_name '
5.5 Display table structure
desc user;
Sql. Cookbook Reading notes 5 meta-data query