I can use (in clause) with on column like this:
Select code from table where code in(1,2,3)
-------------------------------My case:-------------------------------------------------
I’ve 4 columns PK of table as below
I need to :
selectwhere (code, month, year) in ((1,1,2013) and (2,1,2014) and (2,2,2015))
i can't write it this way :
select where code in (1,2) and month in (1,2) and year in (2013,2014,2015)
case i'll get my rows but others included like (1,1,2015) , (1,1,2014),(2,1,2013) .. etc
I’m terribly want to solve this problem
Please help me
Code (pk) | Month (pk) | Year (pk) | emp_code(pk) |
1 | 1 | 2013 | 101 |
1 | 1 | 2013 | 102 |
2 | 1 | 2013 | 101 |
2 | 1 | 2013 | 102 |
1 | 2 | 2013 | 101 |
1 | 2 | 2013 | 102 |
2 | 2 | 2013 | 101 |
2 | 2 | 2013 | 102 |
1 | 1 | 2014 | 101 |
1 | 1 | 2014 | 102 |
2 | 1 | 2014 | 101 |
2 | 1 | 2014 | 102 |
1 | 2 | 2014 | 101 |
1 | 2 | 2014 | 102 |
2 | 2 | 2014 | 101 |
2 | 2 | 2014 | 102 |
1 | 1 | 2015 | 101 |
1 | 1 | 2015 | 102 |
2 | 1 | 2015 | 101 |
2 | 1 | 2015 | 102 |
1 | 2 | 2015 | 101 |
1 | 2 | 2015 | 102 |
2 | 2 | 2015 | 101 |
2 | 2 | 2015 | 102 |
thank you