INSERT INTO table VALUES (NULL, 45, 12, NOW(), SELECT MAX(current_price) + 1 FROM table)
I want to insert a row having the “current price” equal to the max price of the the same table plus 1.
I’m using SELECT MAX(current_price) + 1 FROM table to do this.
The problem is the it returns an error.
Can someone help?
Use brackets around sub-query:
Better way to do this: