It's impossible.
You might want to create a stored procedure, for example
DELIMITER //
CREATE PROCEDURE GetPerson(p_lname VARCHAR(50))
BEGIN
SELECT fname, age, address FROM person WHERE lname = p_lname;
END //
DELIMITER ;
and then be able to
mysql> CALL GetPerson('smith');
But that is pretty much as possible.
mysql The goal of the client is to run SQL queries (and manage the service), SQL is a query language that is not intended to interact with the user.
source
share