Let's say I have a table with 10 fields or so. Now I want to search each record in that table based on an expression (let's say, "example"). I could say this:
SELECT * FROM dataTable WHERE column1 LIKE '%example%' ORDER BY whatever
But I would be restricted to searching 'column1' and any other columns would be ignored. Thus, I could say:
SELECT * FROM dataTable WHERE column1 LIKE '%example%' OR column2 LIKE '%example%' OR column3 LIKE '%example'...ORDER BY whatever
I suppose this would work, but it doesn't seem like a very efficient method. Are there any shortcuts (I tried using the wildcard for the field, but it failed) or other more efficient ways to accomplish this?
Thanks.