In my table I have column with datatype TIME(6). When I perform Max operation it gives me wrong value.
After casting to Varchar it gives me correct value. Can someone please explain why it works after casting and why not on TIME(6) datatype.
The comparison for TIME values is based on the internal UTC (GMT) equivalent, but the external value will have the session time zone offset applied.
So how come varchar gives the correct result ,does it ignore ":" while calculating and also does it implicitly changes from varchar to Integer?