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

Reply via email to