If I set a database column as an autonumber primary key field, will the autonumbering feature prevent those values from being modifiable?
Or does the primary key nature of the column make it unmodifiable?
Both? Neither?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Neither. You can modify it all you want. Setting a column as autoincrement just specifies the default value for new rows, that’s it. After that it acts just like a normal column.
EDIT: Apparently this isn’t true for SQL Server, but you didn’t specify so I just went with the popular answer.