From: yuan edit Date: April 28 2009 4:59am Subject: How to generate unique primary key in MySQL? List-Archive: http://lists.mysql.com/mysql/217297 Message-Id: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=0016364571b830f9480468965394 --0016364571b830f9480468965394 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I have a shopping cart table like this: CREATE TABLE shopping_cart( id VARCHAR(20) NOT NULL, product_id INT NOT NULL, product_quantity INT NOT NULL, ... ... user_id INT NOT NULL, current_timestamp TIMESTAMP, primary key (id) ); I will not use auto_increment Is there other way to generate unique primary key in MySQL? Thank you --0016364571b830f9480468965394--