I want to make sure the ID column is incremented for every insert on a table.
I tried this statement:
INSERT INTO Anlagenteil (ID, TaId, Subtype, Name)
VALUES (MAX(ID)+1, 0, 'BdAnlageteil', 'Barcodeleser0');
Unfortunately I get this error message:
Msg 207, Level 16, State 1, Line 1
Invalid column name 'ID'.