I am curious, is there a good way to search all columns for a given value? For my purposes, it doesn't need to be at all fast, it's just a 1-off kinda thing, and I don't really want to have to type out every field name. That's precisely what I'll be doing for now, but I think surely there's a better way.
I would like to turn this:
SELECT * FROM table WHERE col1 = 'val' OR col2 = 'val' OR col3 = 'val';
SELECT * FROM table WHERE * = 'val'
...or, even better (though I seriously doubt it...)
SELECT * FROM table WHERE * like '%val%'
I found this, which seems kinda-not-really close, but I'm not finding anything closer:
SELECT whatever WHERE col1,col2 IN ((val1, val2), (val1, val2), ...)
Difference being, that searches a selection of columns for the specified values, whereas I'm trying to search ALL columns for a single value.
It's not important though, like I said more than anything I'm just curious