SQL where ANY column is equal to

Is it possible in MySQL to select all rows in which the ANY column contains the specified value?

I am trying to write a universal search function that can work without any information about the table schema.

+4
source share
1 answer

Use SHOW COLUMNS to get a list of columns in a table, and then dynamically build the query from the results.

+4
source

Source: https://habr.com/ru/post/1413215/


All Articles