I have a table which has a column name lets say message Id and the message Id may have lot of keyname and value stored in separate column .
| MessageID | Keyname | Value |
|---|---|---|
| First | ab | 1 |
| Second | ab | 1 |
| Third | ac | 2 |
| First | kk | 4 |
So I need to get the message Id which has "ab" keyname but not "kk". The answer am expecting is Second as it dont have "kk" Keyname.
How could we achieve it ?