I am doing a lot of trial and error with some SQL query in MySQL console e.g.
select fname, age, address from person where lname = ?;
I want to get a prompt asking me for the value of lname, so that I can repeat the query with different values easily. The ? works in case the query is from Java code.
Is it possible in MySQL console, if yes, how?
This is not possible.
You may want to create a stored procedure such as
and then be able to
But this is pretty much as far as you can go.
mysqlclient’s purpose is to run SQL queries (and manage the service), SQL is a query language, not meant for user interaction.