Hi all,
A friend has asked me to write a simple search tool to lookup records in a table containing certain words.
I can do a simple query using
SELECT * FROM table WHERE name LIKE '*word1*' or name LIKE '*word2*'
but was wondering if there is a more appropriate method of doing so..
I tried
name LIKE ('*word1*','*word2*') expecting it to be like IN (1,2,3)but it didn't work
Could anyone help me out here?
Thanks
Ian
A friend has asked me to write a simple search tool to lookup records in a table containing certain words.
I can do a simple query using
SELECT * FROM table WHERE name LIKE '*word1*' or name LIKE '*word2*'
but was wondering if there is a more appropriate method of doing so..
I tried
name LIKE ('*word1*','*word2*') expecting it to be like IN (1,2,3)but it didn't work
Could anyone help me out here?
Thanks
Ian