I’m trying to insert some data to a table contains two things : “a string” and “maximum number in Order column + 1″.
This is my query:
INSERT INTO MyTable ([Text],[Order])
SELECT 'MyText' , (Max([Order]) + 1)
FROM MyTable
What is going wrong with my query?
I’m using Microsoft SQL Server 2005 SP3.
You can test this query like this:
I don’t receive error:
Original:
or
limit is not valid in SQL Server as far as I know.