Merry Christmas

mysql --silent -niGHt -e "SELECT GROUP_CONCAT(val ORDER BY id SEPARATOR ' ') AS Greeting FROM mysql.greeting"
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.

I have worked with MySQL databases since 2006 both as an SQL developer, a database administrator, and for more than eight years as part of the Oracle MySQL Support team. I have spoken at MySQL Connect and Oracle OpenWorld on several occasions. I have contributed to the sys schema and four Oracle Certified Professional (OCP) exams for MySQL 5.6 to 8.0. I have written four books, all published at Apress.

Leave a Reply

Your email address will not be published.

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.