DF034: A variable-size datatype of very small length is used.
Last modified: May 28, 2025
The topic describes the DF034 T-SQL code analysis rule.
Category
BEST PRACTICE
Message
A variable-size datatype of very small length is used.
Description
It is not recommended to use variable-length data types with sizes less than 3 symbols.
Additional information
Using such small sizes may lead to inefficiencies in storage and processing, as variable-length data types are optimized for larger data sizes. Additionally, using very small sizes may not provide enough flexibility for storing meaningful data and could potentially lead to truncation or data loss if the data exceeds the specified size.
Noncompliant code example
DECLARE @v VARCHAR(1)
Compliant solution
DECLARE @v VARCHAR(30)
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.