From: Charles Kirby Date: March 11 1999 7:43pm Subject: Re: sort of defragmentation? List-Archive: http://lists.mysql.com/mysql/35 Message-Id: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Aha, yes, and speaking of dependencies, are table-to-table dependencies spelled out anywhere (I couldn't find this in the on-line manual)? If, for instance, you deleted a line from a table like "contacts", could this leave any orphan data? Thanks, ck On Thu, 11 Mar 1999, Christian Mack wrote: > But try this: > > LOCK TABLE fruits WRITE > DELETE FROM fruits WHERE ID=2 > UPDATE fruits SET ID=ID-1 WHERE ID>2 > UNLOCK TABLE > > This obviously only works, if you delete only one row. > And you have to watch out for dependencies on ID in other tables. > > Tschau > Christian