List:General Discussion« Previous MessageNext Message »
From:yuan edit Date:April 28 2009 4:59am
Subject:How to generate unique primary key in MySQL?
View as plain text  
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

Thread
How to generate unique primary key in MySQL?yuan edit28 Apr
  • Re: How to generate unique primary key in MySQL?yuan edit28 Apr
  • Re: How to generate unique primary key in MySQL?Michael Dykman28 Apr
  • Re: How to generate unique primary key in MySQL?Jim Lyons28 Apr
Re: How to generate unique primary key in MySQL?Michael Dykman28 Apr