blog-banner

Declaring Case Sensitive MySQL Text Field

  • MySql

Simply add "CHARACTER SET binary" after the text field type declaration.

Examples:

1) case insensitive:

my_field VARCHAR(255)

    case sensitive

my_field VARCHAR(255) CHARACTER SET binary

2) case insensitive:

my_field TEXT

    case sensitive:

my_field TEXT CHARACTER SET binary