On Friday 06 July 2001 15:41, Tony Bowden wrote:
> > On Tue, Jun 19, 2001 at 11:12:06PM +0100, Robin Szemeti wrote:
> > umm just do
> > show tables;
> > and ...
> > describe $blah;
>
> And also "show create table $tablename" to recreate the create command
> (which is much easier than trying to piece it together from 'show
> tables', which IIRC you can't reverse engineer composite keys from)
ooh .. dint know that ..
Ive always done
mysqldump --opt -d -u blah sourcedb tablename -p | mysql -B -u blah
destdb -p
when recreating tables in other places
infact mysqldump --opt -d is a pretty good way of keeping a copy of the
schema for hacking and editing for the new one .. in general I find it
easier just to to that and hack it with [vi|xemacs|gedit][1] than it is
typing in all those create statments and then trying to do ALTER TABLE on
all the bits you got wrong ;))