Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3853074
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T17:24:49+00:00 2026-05-19T17:24:49+00:00

What are the commands to enable and disable case sensitivity by default for an

  • 0

What are the commands to enable and disable case sensitivity by default for an entire database on a MySQL server? I’m aware of the COLLATE statement, but it seems it’s necessary to place this in every SQL statement that’s run. Is there an option to set this globally?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T17:24:49+00:00Added an answer on May 19, 2026 at 5:24 pm

    You can set collation at both the database creation and table creation level as a part of the CREATE TABLE statement.

    To set the collation for the entire database, you can use:

    CREATE DATABASE test_database CHARACTER SET utf8 COLLATE utf8_general_cs;
    

    You can also change the collation on an existing database via ALTER DATABASE. (For more information see the MySQL Database Character Set and Collation manual entry.)

    If however, only a single table needs to be treated as case sensitive, you could simply use:

    DROP TABLE IF EXISTS test_table;
    CREATE TABLE test_table (
      test_id bigint unsigned NOT NULL auto_increment,
      ...
    
      PRIMARY KEY test_id (test_id),
      ...
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE utf8_general_cs;
    

    (Case insensitive being “utf8_general_ci“.)

    Finally, the main MySQL Character Set Support manual section is probably worth a quick peruse. (It lists the character sets and collations supported by MySQL, tells you how to set the character set/collation at the server level, etc.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

As of last week, I was able to connect to my MySQL database (in
I have a WPF usercontrol, which contains a toolbar with 5 buttons. The commands
I have a couple of powershell command that are very simple. disable-mailbox dadelgad -confirm:$false
This is for jQuery Mobile. Not all regular jQuery answers will work. I can't
I am developing a 3-tier application (not 3-layer!) with a client application running on
I've noticed that the PHP make that I'm using on a dev box doesn't
I want to learn to use vim. The thing is simple : I don't
I'm trying to set up a rails app with paperclip and ImageMagick on Ubunutu
I get the following error when trying to compile an application using pthreads on
I have bash script where i have echo before every command showing what is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.