select * from TableName
FROM THIS:
ID Col1 Col2 Col3 Col4 Col5
1 aa 21 ss m p
2 aa 21 tt f u
3 bb 21 ss f d
4 bb 22 ss m d
TO THIS
ID Col1 Col2 Col3 Col4 Col5
1 aa 21 ss m p
2 tt f u
3 bb ss d
4 22 m
i want this Output is it possible ?
don’t want repeat duplicate value if it next to the same
Thanks for your time.
You can select everything you want to temporary table, clear repeated values and return result set from updated temporary table.
Query might look like this:
Result:
SQL Fiddle