How to update integer primary key adding 1000? – dba.stackexchange.com

I have the following primary keys in my table: 1,2,3,4,5... Is it possible to update these keys to: 1001,1002,1003,1004,1005... ? UPDATE mytable SET `id`= (select `id` from mytable where id=??)+1000

from Hot Questions - Stack Exchange OnStackOverflow
via Blogspot

Share this

Artikel Terkait

0 Comment to "How to update integer primary key adding 1000? – dba.stackexchange.com"