I have to search for the char ' - ' in all columns (and lines) of my table. Currently I have this:
SELECT *
FROM `my_table`
WHERE (
SELECT C.COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS C
WHERE C.TABLE_NAME = 'my_table'
) LIKE('%-%');
But, of course, this doesn't work because of the multiple values returned by the subquery. Any ideas of how to achieve this?