开发者

Update a PRIMARY ID field with auto increment

开发者 https://www.devze.com 2023-01-31 12:44 出处:网络
MSQl question: I have a web page the has a number of fields going against a msql database. 3 tables: 1. ID = primary key, INT. Auto Incr开发者_Python百科ement

MSQl question: I have a web page the has a number of fields going against a msql database.

3 tables: 1. ID = primary key, INT. Auto Incr开发者_Python百科ement 2. Name = text field, 3. Address = text field

On that web page I'm showing all fields, but only fields 2,& 3 can update and not the PRIMARY KEY. basically, I see the issue that trying to overwrite a field that is auto generating is probably the problem. But I need the auto increment because on another web page I'm adding a record that the product web page gets the record and displays it online.

Question; Is there a way to (OVERWRITE) update a PRIMARY ID KEY field that is auto incremented?


You can easily update a record with a primary auto_increment key just like any other field, but the values must remain unique.

0

精彩评论

暂无评论...
验证码 换一张
取 消