2011年3月28日 星期一

mysqldump one table with structure

1.use mysqldump to dump table structure without data
mysqldump -u root -pabc123 -d --databases EbookStore > 20110328.sql

create table structure from another database

1.login to mysql database;

2.use create table tablename as select * from dbname.tablename;
use BookStore;
create table newBook as select * from OldBookStore.newBook;