faqts : Computers : Programming : Languages : PHP : Database Backed Sites : MySQL

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

43 of 60 people (72%) answered Yes
Recently 8 of 10 people (80%) answered Yes

Entry

How can I make columns in MySQL case sensitive?

Aug 6th, 1999 22:17
Nathan Wallace, Adam Whitehead


Use the BINARY keyword on each column you want to be case sensitive.

    ie. COLUMN_X CHAR(128) BINARY NOT NULL

Then it will use case sensitive searches and selects. It is important to
note that even if a column doesn't include the BINARY keyword, all data
is still stored in the correct case.