At 11:10 -0700 10/15/02, David Yee wrote:
>Hi all.  What's the quickest way to copy a table so that all column
>attributes such as auto_increment and primary key along with all indexes get
>copied over?  I like using:
>
>create table new_table select * from old_table
>
>But it doesn't copy any indexes or those special attributes I mentioned over
>to the new table.  I know this can be done using mysqldump but I'm wondering
>if there's something quicker (less involved).  Thanks.

mysqldump uses the SHOW CREATE TABLE statement.  Hard to use this output
in a pure SQL environment, but if you issue it from within a program,
you can use the output as you like.

>David


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to