I’ve got a database I’m searching through, and I want to be able to return all rows who have at least one field in them that matches the search criteria. Is there an easier way to do this than looping through all the columns? Something like:
SELECT *
FROM table
WHERE [insert very simple code here] LIKE fieldString
If not I can just loop, I was just wondering if there was a simple solution I was missing.
Use ORs in your WHERE clause:
WHERE col1 LIKE .... OR col2 LIKE .... OR col3 LIKE ...