I have a table name myTable with rows like below:
*--------------------------------------------*
| S.No. | user_id | Event Name | Event Date |
*--------------------------------------------*
| 101 | 9,19 | Juniorun | 25-June-19 |
*--------------------------------------------*
| 102 | 9,20 | Juniorun1 | 30-June-19 |
*--------------------------------------------*
| 103 | 9,21 | Juniorun2 | 27-June-19 |
*--------------------------------------------*
| 104 | 9,18,19 | Juniorun3 | 26-June-19 |
*--------------------------------------------*
Now I have user id 19 And through this, I want to select row whose user Id is 19.
I want:
*--------------------------------------------*
| S.No. | user_id | Event Name | Event Date |
*--------------------------------------------*
| 101 | 9,19 | Juniorun | 25-June-19 |
*--------------------------------------------*
| 104 | 9,18,19 | Juniorun3 | 26-June-19 |
*--------------------------------------------*
For this I am using the following query:
SELECT * FROM myTable WHERE user_id IN ('19');
But my query is not given any value. It is showing blank.