max length of primary key

2004-01-07 Thread Francis Mak
Hi, I have a problem when creating a table: CREATE TABLE test ( test_key varchar(255) NOT NULL default '', test_value text NOT NULL, PRIMARY KEY (test_key) ) TYPE=MYISAM; It then report error: mySQL Error: Specified key was too long. Max key length is 500 Why the varchar exceeded

Re: max length of primary key

2004-01-07 Thread Martijn Tonies
Hi, I have a problem when creating a table: CREATE TABLE test ( test_key varchar(255) NOT NULL default '', test_value text NOT NULL, PRIMARY KEY (test_key) ) TYPE=MYISAM; It then report error: mySQL Error: Specified key was too long. Max key length is 500 Why the varchar