Output format


Use concat to the SELECT statement in order to add text:

mysql> SELECT CONCAT('prune yes=', VolumeName),VolStatus,StorageId FROM Media WHERE LastWritten < '2015-10-15' AND (StorageId = 33 OR StorageId = 34);
| CONCAT('prune yes=', VolumeName)     |
| prune yes=HQ-Windows-Incr-7860       |
| prune yes=hq-windows-large-full-9199 |
| prune yes=hq-windows-large-full-9200 |


Source Search a table over all databases:

Seach for the table mailbox that is in one of the zillion databaes running in the current instance:

mysql> SELECT table_name, table_schema as database FROM information_schema.tables WHERE table_schema='mailbox';