I have a primary key that I don\'t want to auto increment (for various reasons) and so I\'m looking for a way to simply increment that field when I INSERT. By simply, I mean
This should work:
INSERT INTO Table1 (id, data_field) SELECT (SELECT (MAX(id) + 1) FROM Table1), '[blob of data]';
Or this (substitute LIMIT for other platforms):
INSERT INTO Table1 (id, data_field) SELECT TOP 1 MAX(id) + 1, '[blob of data]' FROM Table1 ORDER BY [id] DESC;