I have a table with a lot of integer fields
like:
fields1 | fields2 | fields3 | fields4 ....
0 | 1 | 0 | 2 ....
there is an easy way to find if at least one number 2 is in this fields
except of the long way of
where fields1 =2 or fields2=2 or fields3 =2 or fields4 = 2 .........
another question if there easy way to select the rows that
numbers 2 appear between 2 to 3 times in this fields.
Though I should suggest that your normalize your database structure. This kind of one to many relationship is better represented by using a keys to link up relations between tables. You could store your id values in one table and then junction them to the relevant integers in another table using their ids, so one row could own multiple integers.
http://databases.about.com/od/specificproducts/a/normalization.htm