"Jacques Buitendag" <[EMAIL PROTECTED]> wrote: > > I have recently discovered that when you place a primary key constraint on a column > of type CHAR(2) the constraint causes the following to happen when I add a new row > to the table: > > if a key ("AA") is already in the table then I can not add "Aa", "aA" or "aa" > > this seams a bit wrong as 'A' != 'a' in the representation of CHAR > > Is this the way that primary key constraints are specified in ANSI SQL ? and is > there a way of inserting "AA" and "aa"
CHAR columns are compared in case-insensitive fashion. Declare your column as BINARY: http://www.mysql.com/doc/en/CHAR.html -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]