SQL Server has a COL_LENGTH() function and a DATALENGTH() function that could easily be confused for doing the same thing. They both have “length” in their name, and they do indeed return a “length”. But the length returned is different for each function.
If you’ve ever wondered why DATALENGTH() gives you different numbers than COL_LENGTH(), read on to find out.