I store multiple values in VendorIDs
field and I want to SELECT
by using WHERE
one value of my multiple values.
Ex :
Table
| OrderIDs | VendorIDs | CustomerIDs |
--------------------------------------
| 1 | 2, 3, 4 | 01 |
| 2 | 1, 2, 4 | 02 |
| 3 | 1 | 03 |
| 4 | 2, 3, | 04 |
--------------------------------------
Code
SELECT * FROM orders WHERE VendorIDs = 2
When I selected VendorIDs = 2
it will be displayed by only first of values = 2.
| OrderIDs | VendorIDs | CustomerIDs |
--------------------------------------
| 1 | 2, 3, 4 | 01 |
| 4 | 2, 3, | 04 |
--------------------------------------
And this is what I want it should be displayed like this :
| OrderIDs | VendorIDs | CustomerIDs |
--------------------------------------
| 1 | 2, 3, 4 | 01 |
| 2 | 1, 2, 4 | 02 |
| 4 | 2, 3, | 04 |
--------------------------------------