What would be the difference between default output format when running MySQL in batch mode or interactively?

MySQLMySQLi Database

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

mysql> select * from hh;

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

On the other hand, if we will run the same query in batch mode then following would be the format of output −

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

id
1
2
raja
Published on 21-Feb-2018 06:59:26
Advertisements