How can I suppress column header output for a single SQL statement?
问题 I\'m executing some SQL statements in batch (using the mysql command-line binary). I want one of my several SELECT statements to not print the column headers, just the selected records. Is this possible? 回答1: Invoke mysql with the -N (the alias for -N is --skip-column-names ) option: mysql -N ... use testdb; select * from names; +------+-------+ | 1 | pete | | 2 | john | | 3 | mike | +------+-------+ 3 rows in set (0.00 sec) Credit to ErichBSchulz for pointing out the -N alias. To remove the