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: *****

Updated on 22-Jun-2020 04:58:48