I have a table where I want one value to be set to the same as another when inserting.
Here's the table in question;
CREATE TABLE categories (
id INT NOT NULL AUTO_INCREMENT,
title VARCHAR(30) NOT NULL,
root INT NULL DEFAULT id,
PRIMARY KEY(id)
);
I want the column ´root´ to get the same value as the ´id´ column gets when inserting a new row. I guess I can just do it in two queries, but I hoped I could do it in just one.
Thanks,
_L