※ 引述《KarlJhan ()》之銘言:
: 假設 A資料庫有資料表a
: B資料庫目前無任何資料表
: 如何能讓資料表a,複製一份至B,只需欄位、格式、限制
: 而不用任何資料?
: Database : MySql
: 環境:Appserv
: 謝謝各位
手邊目前沒有 Windows 環境,底下是 FreeBSD 7.1 環境
不過我想在 Appserv 操作模式也是一樣的
mysqldump --no-data -u root -p a > a.sql
--no-data, -d
Do not write any table row information (that is, do not dump table
contents). This is useful if you want to dump only the CREATE
TABLE
statement for the table (for example, to create an empty copy of
the table by loading the dump file).
Restore DB
mysql -u root -p b < a.sql
這樣就可以了
--
PHP MVC CodeIgniter 繁體中文手冊: http://tinyurl.com/mduyv8
PHP MVC CodeIgniter 繁體中文討論區:http://tinyurl.com/yayzoz8
PHP MVC CodeIgniter 中文官方網站: http://tinyurl.com/yatds8n
Appleboy Blog 電腦技術: http://blog.Wu-Boy.com
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 219.70.25.7