Depends on the DBMS. IIRC, MySql allocates 2 bytes of overhead for varchars> 255 characters (for tracking varchar lengths). MSSQL <= 2000 will allow you to allocate a row size> 8060 bytes, but it fails if you try to insert an INSERT or UPDATE string that actually exceeded 8060 bytes. SQL 2005 [1] allows you to insert, but will select a new page for overflow and leave the pointer behind. This obviously affects performance.
[1] varchar (max) is a special case, but will also highlight an overflow page if the field length is> 8000 or a string> 8060. This is with the default settings of MSSQL, and the behavior can change with larger types in the data row option.
source share