siliconpi siliconpi - 4 months ago 5x
SQL Question

MYSQL query for searching through ALL the fields?

As dumb as it sounds, is there a way to do something like this:

select row_id from mytable where * like '%searched_text%';

By * here I mean "all the fields" in the table, instead of me specifying them one by one...


It is not possible with one query.

However when you do:

DESCRIBE table_name;

you get the field names which you can generate the query from. May be useful.