However, the values need to be exchanged is the primary key in case you can not like this post said that there would be similar to those methods such errors
ERROR 1062 (23000): Duplicate entry '2 'for key' PRIMARY '
So how to solve it ? Use the search engine to see such a post resolve the above error http://www.softwareprojects.com/resources/programming/t-how-to-fix-mysql-duplicate-entry-for-key-primary-o- 1844.html
but could not solve my problem you do not know what a good big cow exchange solutions and the primary key for the primary key value increment
------ Solution - ------------------------------------------
this is no way
------ Solution ------------------------------------------ -

------ Solution ---------------------------------------- 1,2 ----
a field is the primary key , the database automatically generated and can not be changed , but added 1,2 b field can be exchanged
------ For reference only - -------------------------------------
assuming there is such a table

a primary key field, then how to exchange a field value of 1 and 2 without affecting the b field
------ For reference only ------------- --------------------------
ah understand
没有评论:
发表评论