Parece que você deseja usar a opção -e
, abreviação de --execte
, certo?
De man mysql
:
--execute=statement, -e statement
Execute the statement and quit. The default output format is like
that produced with --batch. See Section 4.2.3.1, “Using Options
on the Command Line”, for some examples. With this option, mysql
does not use the history file.
Diferente do PSQL, -c
é a abreviação de --comments
aqui:
--comments, -c
Whether to preserve comments in statements sent to the server.
The default is --skip-comments (discard comments), enable with
--comments (preserve comments).