How can I simulate a print statement in MySQL?

How can I simulate a print statement in MySQL?

If you do not want to the text twice as column heading as well as value, use the following stmt!

SELECT some text as ;

Example:

mysql>SELECT some text as ; +-----------+ | | +-----------+ | some text | +-----------+ 1 row in set (0.00 sec)

You can print some text by using SELECT command like that:

SELECT some text

Result:

+-----------+
| some text |
+-----------+
| some text |
+-----------+
1 row in set (0.02 sec)

How can I simulate a print statement in MySQL?

This is an old post, but thanks to this post I have found this:

! echo some text;

Tested with MySQL 8 and working correctly. Cool right? 🙂

Leave a Reply

Your email address will not be published.