Home > Database > Mysql Tutorial > body text

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

王林
Release: 2023-08-30 16:21:02
forward
559 people have browsed it

以批处理模式或交互方式运行 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)
Copy after login

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
Copy after login

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!

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!