DF189: Explicit length is not specified for varying-length character data type.

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

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge Studio for SQL Server.
All Features

All features

Get acquainted with the rich features and capabilities of the Studio in less than 5 minutes.
Request a demo

Request a demo

If you consider employing the Studio for your business, request a demo to see it in action.
Ready to start using dbForge Studio for SQL Server?