Is this possible?
Insert Into Customer(CustomerID, CustomerName) Values('6','test') on DUPLICATE key Update CustomerID='Select Max(customerID)+1 from Customer'
why not just go with :
insert into customer(customerid, customername) select max(customerid) + 1 , 'test'
from customer
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.