The topic describes the DF007 T-SQL code analysis rule.
BEST PRACTICE
The length of the datatype is not specified.
It is recommended to explicitly specify the length of the (N)VARCHAR, VARBINARY, (N)CHAR, BINARY, DECIMAL, and NUMERIC datatypes in the CAST and CONVERT clauses.
It is an optional integer used to specify the length of the target data type, specifically for data types that allow user-defined lengths.
SELECT CAST(FirstName as varchar) AS FirstName
FROM dbo.Customers
SELECT CAST(FirstName as varchar(128)) AS FirstName
FROM dbo.Customers