mysql --silent -niGHt -e "SELECT GROUP_CONCAT(val ORDER BY id SEPARATOR ' ') AS Greeting FROM mysql.greeting"
|Merry Christmas and Happy New Year
See you in 2013
mysql is the MySQL Command Line Client – my favourite tool when using MySQL. It is available on all platforms where you can install MySQL and is part of a standard installation. As you can see there are many options, including the
-H which causes the output to be HTML formatted. OK, I cheated here and created the table manually as my blog editor escapes HTML code – the actual output looked like:
<TABLE BORDER=1><TR><TH>Greeting</TH></TR><TR><TD>Merry Christmas and Happy New Year See you in 2013</TD></TR></TABLE>
So a Happy Christmas and Happy New Year to all MySQL users.