如何使用putty将查询结果提取为sql文件格式

时间:2015-12-09 07:39:02

标签: mysql

有没有办法将select查询结果提取为SQL文件格式?

以下是查询:

Select * from shift_details where employee_number= '121' and work_date between '2015-11-01' and '2015-11-05'

1 个答案:

答案 0 :(得分:1)

使用mysqldump和--where标志添加您的查询

<struts>
    <constant name="struts.ui.theme" value="simple" />
    <package name="default" extends="struts-default" namespace="/">

        <result-types>
            <result-type name="tiles"
                class="org.apache.struts2.views.tiles.TilesResult" />
        </result-types>

        <action name="" class="com.javaguy.struts2.IndexAction">
            <result name="master" type="tiles">master</result>
        </action>

        <action name="add" class="com.javaguy.struts2.AddAction">
            <result name="add" type="tiles">add</result>
        </action>

        <action name="edit" class="com.javaguy.struts2.EditAction">
            <result name="edit" type="tiles">edit</result>
        </action>

        <action name="view" class="com.javaguy.struts2.ViewAction">
            <result name="view" type="tiles">view</result>
        </action>
    </package>
</struts>

有关详细信息,请参阅https://dev.mysql.com/doc/refman/5.5/en/mysqldump.html