Imagine this table:
| 1 | 2 | 1 | 2 | 1 |
| 1 | 2 | 3 | 2 | 1 |
| 1 | 2 | 3 | 4 | 1 |
How would I go about removing rows with duplicate values, excluding the first and last column...I could very well be thinking of this in an awkward manner. e.g.:
First row : 1 2 1 2 1 - it has two 2s, and 3 1s. I want to remove this because : it has two 2s, and the middle 1 can be found in the beginning, or end column of the row.
Second row : 1 2 3 2 1 - it has two 2s. I want to remove this because : it has two 2s.
Third row : Is fine. the duplicate values at first and last column do not matter, and the values in between are different !
I can imagine a few awkward ways to do this, but since SQL is not my strongest quality, I'd like to hear the pros' opinions :)