Will the following select query list all of the tables in the information_schema database? If not, why?

Will the following select query list all of the tables in the information_schema database? If not, why?

SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = ‘INFORMATION_SCHEMA’
ORDER BY TABLE_NAME

Will the following select query list all of the tables in the information_schema database? If not, why?

SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = ‘INFORMATION_SCHEMA’
ORDER BY TABLE_NAME

A.
Yes.

B.
No; the INFORMATION_SCHEMA database does not contain information on itself.

C.
No; the WHERE clause is incorrect. The correct field name is TABLE_SCHEMATA.

D.
No; there is no table in the INFORMATION SCHEMA database called TABLES.

Explanation:
Lists 37 tables including some of those listed on p315, eg CHARACTER_SETS, COLLATIONS, COLUMNS, ROUTINES, SCHEMATA, TABLES, VIEWS etc.



Leave a Reply 0

Your email address will not be published. Required fields are marked *