On 28-Jun-01 Dave Brown wrote:
> Is there an easy way to restore just one table from a mysqldump of all the
> tables?
> 

If the (empty) table already exists:
grep " INTO table VALUES " backup.dmp | mysql dbname

If it doesn't then use awk to create it:
awk '/^CREATE TABLE table/,/^);/' backup.dmp | mysql dbname

then the grep above.

Regards,
-- 
Don Read                                       [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

---------------------------------------------------------------------
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