rookiecoder
10-04-2009, 07:22 PM
Hi,
I have a table TEST with 3 fields ; id (Primary) , worker_id(int) , type( enum where possible values are 'a','b','c')
Now, I am trying to retrieve all rows where I have the same worker_id and type set to 'a'.
e.g
Test
id | worker_id | type
1 | 1 | a
2 | 1 | b
3 | 2 | c
4 | 1 | a
So I would want rows 1 and 4 to be returned, but can't figure the sql query which can get it for me
I have a table TEST with 3 fields ; id (Primary) , worker_id(int) , type( enum where possible values are 'a','b','c')
Now, I am trying to retrieve all rows where I have the same worker_id and type set to 'a'.
e.g
Test
id | worker_id | type
1 | 1 | a
2 | 1 | b
3 | 2 | c
4 | 1 | a
So I would want rows 1 and 4 to be returned, but can't figure the sql query which can get it for me