0

I would like to be able to query the table Users and its columns UserName and Email case insensitively:

select username, email from users;

I know MySQL is case-insensitive for strings by default--that is not my question. I would like to query case-insensitive table and column names.

The SQL Server environment I work allows me to do so but don't know how to do so in MySQL.

Govind Rai
  • 14,406
  • 9
  • 72
  • 83

1 Answers1

1

You can use the lower_case_table_names system variable as described in Documentation. You can set this variable to the allowed value on start of mysqld or even in my.cnf config file

Rahul
  • 76,197
  • 13
  • 71
  • 125