Hi, is it possible to use MAX function in an insert query?
I try to write a query similar to this:
INSERT INTO TableName (ID,Value)
VALUES (SELECT coalesce(MAX(ID),0) + 1 FROM TableName, 'something')
I get error, Incorrect syntax near the keyword 'SELECT'.
Thank you for help.
Computer Enterprise Masoud Keshavarz
I don't care about hell.
If I go there I've played enough Diablo to know how to fight my way out.