What is the equivalent of the spool command in MySQL?

前端 未结 3 1413
旧巷少年郎
旧巷少年郎 2020-12-12 02:43

I know you use the spool command when you are trying to write a report to a file in Oracle SQLplus.

What is the equivalent command in MySQL?

This is my code:

3条回答
  •  有刺的猬
    2020-12-12 03:12

    If I get what you are asking:

    mysql dbname < ${DB_ADMIN_HOME}/Scripts.Datavalidation/Datareportscript.sql \
    > ${DB_ADMIN_HOME}/data/Datareport.log 
    

    Use redirection.

提交回复
热议问题