Home  >  Article  >  Database  >  What is the difference in the default output format when running MySQL in batch mode or interactively?

What is the difference in the default output format when running MySQL in batch mode or interactively?

王林
王林forward
2023-08-30 16:21:02524browse

以批处理模式或交互方式运行 MySQL 时,默认输出格式有什么区别?

The default MySQL output will be different if we run the same query interactively or in batch mode. For example, if we run the query select * from hh in interactive mode, then the following will be the output format -

mysql> select * from hh;

+------+
| id   |
+------+
|  1   |
|  2   |
+------+
2 rows in set (0.01 sec)

On the other hand, if we run the same query in batch mode, then The output format is as follows-

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

id
1
2

The above is the detailed content of What is the difference in the default output format when running MySQL in batch mode or interactively?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete