欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

詳解MySQL導(dǎo)出指定表中的數(shù)據(jù)的實例

 更新時間:2017年09月11日 09:53:57   作者:codingstandards  
這篇文章主要介紹了詳解MySQL導(dǎo)出指定表中的數(shù)據(jù)的實例的相關(guān)資料,希望通過本文能幫助到大家,需要的朋友可以參考下

詳解MySQL導(dǎo)出指定表中的數(shù)據(jù)

要求:

1. 不導(dǎo)出創(chuàng)表的語句,因為表已經(jīng)建好:默認會導(dǎo)出,先drop table然后create table;
2. 導(dǎo)出的insert語句加上ignore,允許重復(fù)執(zhí)行:默認不會加上ignore;
3. insert語句中列出表中的字段,看得更清楚:默認不會;
4. 分記錄生成多條insert語句,修改起來比較容易:默認是一條; 

最終結(jié)果如下:

mysqldump -pxxxxxx qzt qf1_mail_account --no-create-info --insert-ignore --complete-insert --skip-extended-insert >qf1_mail_account.sql

其中:

-pxxxxxx 指定密碼
qzt 數(shù)據(jù)庫名
qf1_mail_account 表名
>qf1_mail_account.sql 保存到文件 

mysqldump --help 寫道

 -t, --no-create-info 
           Don't write table creation info.
 --insert-ignore   Insert rows with INSERT IGNORE.
 -c, --complete-insert 
           Use complete insert statements.
 -e, --extended-insert 
           Use multiple-row INSERT syntax that include several
           VALUES lists.
           (Defaults to on; use --skip-extended-insert to disable.)

如有疑問請留言或者到本站社區(qū)交流討論,感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!

相關(guān)文章

最新評論