DECLARE @lengthtest VARCHAR(15) -- plain text SET @lengthtest = 'testing' SELECT @lengthtest, LEN(@lengthtest), DATALENGTH(@lengthtest) -- add 3 empty spaces SET @lengthtest = 'testing ' SELECT @lengthtest, LEN(@lengthtest), DATALENGTH(@lengthtest) -- add a special character ® SET @lengthtest = 'testing'+char(0174) SELECT @lengthtest, LEN(@lengthtest), DATALENGTH(@lengthtest) -- add a non-visible special character, a carriage return for example SET @lengthtest = 'testing'+CHAR(13) SELECT @lengthtest, LEN(@lengthtest), DATALENGTH(@lengthtest) -- remember, datatype matter too! NVarchar stores in 2 bit blocks, so your datalength will usually be near double the len value DECLARE @Nlengthtest NVARCHAR(15) -- plain text SET @Nlengthtest = N'testing' SELECT @Nlengthtest, LEN(@Nlengthtest), DATALENGTH(@Nlengthtest) -- both functions also work with other data types, like integers! DECLARE @Ilengthtest int SET @Ilengthtest = 1234567 SELECT @Ilengthtest, LEN(@Ilengthtest), DATALENGTH(@Ilengthtest) -- not the len is the actual length of the number, but the datalength is how much space is being used to store it.