Increasing a column values partially

From: <bit-naughty_at_hotmail.com>
Date: Mon, 29 May 2017 06:35:20 -0700 (PDT)
Message-ID: <217f2416-0d5e-467e-b494-5391c15fb2c2_at_googlegroups.com>



[Quoted] [Quoted] [Quoted] I have a column, say col, which has nos. sequentially, like 1,2,3, etc. .... sorta like a primary key, but only not - if I want to insert a new row which will be IN BETWEEN, eg. a new line with the no. "2" between 2 and 3, all rows with the column value 2 onwards need that value inc'd by 1 (I think this is what they call a linked list). How do I do this in MySQL?

[Quoted] It's a - INSERT INTO table VALUE col, (col+1) WHERE col >=2 , essentially, in pseudocode. How? :)

Thanks. Received on Mon May 29 2017 - 15:35:20 CEST

Original text of this message