FAQs Categories
Client Server Commands
Database Structure
Table Types or Storage Engines
SQL Statements
Table Joins
Funtions and Operators
Tricky Select Queries
Speed Up Queries
Data Back Up
General Questions
1PLs Company - #1Payday.Loans Agency - Loans online and near me $100-$2500 (Same Day)
Powered by MySQL
Home / General Questions / Question No: 197

How does MySQL manage case sensitivity of identifiers?

Answer No: 197

A property that affects how you use identifiers is whether they're case sensitive; some identifiers are case sensitive and others are not. You should understand which is which and use them accordingly.

The rules that determine whether an identifier is case sensitive depend on what kind of identifier it is:

  • For database and table identifiers, case sensitivity depends on the operating system and filesystem of the server host, and on the setting of the lower_case_table_names system variable. Databases and tables are represented by directories and files, so if the operating system has case-sensitive filenames, MySQL treats database and table identifiers as case sensitive. If filenames aren't case sensitive, these identifiers are not either. Windows systems do not have case-sensitive filenames, but most Unix systems do. However, if the lower_case_table_names system variable is set to 1 or 2, database and table identifiers and table aliases are used in case-insensitive fashion in SQL statements. If you plan to use this variable, you should set it before creating any databases and tables.
    Regardless of the case-sensitive properties of your filesystem, database and table identifiers must be written consistently with the same lettercase throughout a given statement.
  • Column, index, stored routine, and trigger identifiers are not case sensitive.
  • Column aliases are not case sensitive.

Related MySQL FAQs to the Above FAQ

How-can-I-detect-that-MySQL-is-already-installed How can I detect that MySQL is already installed?

What-is-prepared-statement-in-MySQL What is prepared statement in MySQL?

Maximum-number-of-columns-in-a-table Maximum number of columns in a table


What-are-reserved-words-in-MySQL What are reserved words in MySQL?

How-to-manage-Time-Zone-in-MySQL How to manage Time Zone in MySQL?

What-is-History-of-MySQL What is History of MySQL?

Why-values-with-spaces-do-not-come-into-search-result Why values with spaces do not come into search result?

What-are-MySQL-connectors-or-client-interfaces What are MySQL connectors or client interfaces?

About FAQs: Recently Added FAQs

About MySQL FAQs: Site Map | Bookmark Us | Recommend this Site to Your Friend | Contact Us

Useful Links: | | | |

© 2023
All rights reserved.