I’m assuming that id
is supposed to be an incrementing value.
You need to set this, or else if you have a non-nullable column, with no default value, if you provide no value it will error.
To set up auto-increment in SQL Server Management Studio:
- Open your table in
Design
- Select your column and go to
Column Properties
- Under
Indentity Specification
, set(Is Identity)=Yes
andIndentity Increment=1