DF189: Explicit length is not specified for varying-length character data type.
Last modified: May 28, 2025
The topic describes the DF189 T-SQL code analysis rule.
Category
BEST PRACTICE
Message
Explicit length is not specified for varying-length character data type.
Description
It is recommended to explicitly specify data length to prevent data truncation errors.
Noncompliant code example
CREATE TABLE dbo.DemoTable(code VARCHAR NOT NULL)
GO
Compliant solution
CREATE TABLE dbo.DemoTable(code VARCHAR(128) NOT NULL)
GO
Was this page helpful?
Want to find out more?
Overview
Take a quick tour to learn all about the key benefits delivered by dbForge Studio for SQL Server.
All features
Get acquainted with the rich features and capabilities of the tool in less than 5 minutes.
Request a demo
If you consider employing this tool for your business, request a demo to see it in action.