Forum Moderators: coopster

Message Too Old, No Replies

Query "flexibility"

         

dave1236

1:54 am on Sep 15, 2006 (gmt 0)

10+ Year Member



If I have a column in my table named 'category' and one row of data has these two words in the 'category' field: "sports" "hockey"

If I write a query like:

SELECT * from table WHERE category='sports'

will the row with sports and hockey be returned? If not, is there a way I could get it returned? OR do I have to create separate rows with the same data except for 'category' (which would make my DB really large)!

Thanks!

Psychopsia

2:16 am on Sep 15, 2006 (gmt 0)

10+ Year Member



Hi!

Try using LIKE:

SELECT * FROM table WHERE category LIKE 'sports%'

dave1236

2:46 am on Sep 15, 2006 (gmt 0)

10+ Year Member



and the same syntax for just hockey?

I will give it a try!

Thanks!