mysql根据特定条件导出表 [英] mysql export table based on a specific condition

查看:271
本文介绍了mysql根据特定条件导出表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要导出表的数据和结构,但是数据必须具有特定条件(WHERE status = 0).我知道我可以使用mysqldump导出整个表,但是我不知道如何使它仅导出"where status = 0".任何建议将不胜感激

I need to export the data and structure of a table but the data must have a specific condition (WHERE status=0). I know that I can use mysqldump to export the whole table but I don't know how to make it export only "where status=0". Any advice would be appreciate

推荐答案

<pre>
mysqldump -t -u [username] -p mydatabase mytable --where=status=0

这篇关于mysql根据特定条件导出表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆