You can create a MySQL table with a column named 'key' if you always quote column names: CREATE TABLE `select` ( `key` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, `insert` VARCHAR(11) NOT NULL, `where` VARCHAR(11) NOT NULL, PRIMARY KEY(`key`) ); insert into `select` (`insert`,`where`) values ('foo','bar=''bat'''); SELECT * FROM `select` s;