In SQL server 2005 this query
select len(cast(\'the quick brown fox jumped over the lazy dog\' as varchar))
returns 30 as length while the
I don't know why they chose 30, but it was the same in Sybase SQL Server, which Microsoft's SQL Server was developed from. It seems to be a peculiarity of those RDBMSs as it's not in the SQL standards, and other servers differ in their behaviour.