Reputation: 2806
My column type is Number
, and this number rule is
1,2 => 3
1,2,4 => 7
2,4 => 6
Finally, I will save the result, ex 3, 7, 6.
It's a sum of binary. can I check include 2 on the where condition? Thanks your help.
example
| id | type | data |
|----|------|------|
| 1 | 2 | test |
| 2 | 3 | test2|
| 3 | 1 | test3|
| 4 | 6 | test4|
The result is I want.
| id | type | data |
|----|------|------|
| 1 | 2 | test |
| 2 | 3 | test2|
| 4 | 6 | test4|
sql ex
select * from test_table where type "include 2";
Upvotes: 0
Views: 24