Creating table in MemSQL and creating composite primary key. Lets create simple table with following structure:

Table User Data Name userid

Primary Key (userid)

And assume application support case sensitive userid. So that following user id considered to be different: abc ABC

Insert following data: 1) JOHN ABC b) ALEX abc

Insert fails in MemSQL as it consider 'ABC' same as 'abc'.

Please help me to understand if case sensitive primary key possible in MemSQL table or not.


In order to make primary key to support case sensitive, binary character set helps in this.

To set binary character set at database level, following command can be used: SET collation_connection = 'utf8_bin';

To set at column level, following command can be used: create table CaseSensitive ( name varchar(5) binary, age int, primary key(name));

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.