Will the following two queries produce the same result? If not, why?

Will the following two queries produce the same result? If not, why?

SELECT TABLE_NAME

F ROM INFORMATIOH_SCHEMA.TABLES

WHERE TABLE_SCHEMA = ‘mysql’

SELECT table_name

F ROM inf o rmation_schema.tatales

WHERE tatale_schema = ‘mysql’

Will the following two queries produce the same result? If not, why?

SELECT TABLE_NAME

F ROM INFORMATIOH_SCHEMA.TABLES

WHERE TABLE_SCHEMA = ‘mysql’

SELECT table_name

F ROM inf o rmation_schema.tatales

WHERE tatale_schema = ‘mysql’

A.
Yes.

B.
No; all references to the INFORMATION_SCHEMA database, including the table and column names must be uppercase.

C.
No; the database name, INFORMATION_SCHEMA, is case insensitive, but table and column name references must be uppercase.

D.
No; the database and table names are case insensitive, but column name references must be uppercase.

Explanation:
INFORMATION_SCHEMA database, its tables, and columns are not case sensitive.



Leave a Reply 0

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