stepherd
asked on
General SQL Query Question
How does one pass a LIKE query to all the fields in a database? For example, the following:
SELECT * from Genetics WHERE Genetics.author LIKE '%smith%'
Returns records with "smith" in the authors field, but what if I wanted to search for "smith" in ALL the fields?
I tried
SELECT * from Genetics WHERE Genetics.* LIKE '%smith%'
And it didn't work (yes, I'm new to SQL).
Any help would be appreciated.
Thanks,
Dave Stephens
SELECT * from Genetics WHERE Genetics.author LIKE '%smith%'
Returns records with "smith" in the authors field, but what if I wanted to search for "smith" in ALL the fields?
I tried
SELECT * from Genetics WHERE Genetics.* LIKE '%smith%'
And it didn't work (yes, I'm new to SQL).
Any help would be appreciated.
Thanks,
Dave Stephens
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Never hurts to ask! Thanks.
--Dave Stephens