[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Renumber keys in mysql
- Subject: [ale] Renumber keys in mysql
- From: cfowler at outpostsentinel.com (Chris Fowler)
- Date: Thu, 21 Jul 2011 12:01:24 -0400
- In-reply-to: <CABQUKra1xE8TgV20U7R6JmM2BaZSK3rG_YR_LYY_=H1s0nKoHA@mail.gmail.com>
- References: <1311261796.13700.248.camel@compaq-desktop> <CAOy4VzeVD6DiVDsa9dq02qiJ2eKwQ05Cmb9sTEGGiB10rOAFqw@mail.gmail.com> <CABQUKrY-uwsbF5rPAsOfr128-qytv2g9TJ=dS2OqZ2E0G-61=Q@mail.gmail.com> <1311263482.13700.250.camel@compaq-desktop> <CABQUKra1xE8TgV20U7R6JmM2BaZSK3rG_YR_LYY_=H1s0nKoHA@mail.gmail.com>
On Thu, 2011-07-21 at 11:58 -0400, Omar Chanouha wrote:
> insert into original (name) select concat(name,'x') from (select *
> from original where id > 50 and id < 150);
Yep. He will use concat to rename but some other tables need to be
totally changed. Some data has to be replaced using update. Of course
that could be done after the initial insert. Just do an update ont hose
ids