Home > Database > Mysql Tutorial > body text

When running MySQL statements in batch mode, how can we print and output which statements are being executed?

WBOY
Release: 2023-09-12 23:45:02
forward
1272 people have browsed it

在批处理模式下运行 MySQL 语句时,我们如何打印以及输出正在执行哪些语句?

MySQL statements can be printed along with the output by using the -v option in batch mode. For example, after running the same query in batch mode using the –v option, we will get the statements printed along with the output.

C:\Program Files\MySQL\bin>mysql -u root -p gaurav < hh.sql -v
Enter password: *****

--------------
select * from hh
--------------
id
1
2
Copy after login

It shows the statement select * from hh, which is written to the file hh.sql.

The above is the detailed content of When running MySQL statements in batch mode, how can we print and output which statements are being executed?. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template