DF190: No nullability constraint is specified for table column.

The topic describes the DF190 T-SQL code analysis rule.

Category

BEST PRACTICE

Message

No nullability constraint is specified for table column.

Description

It is recommended to explicitly specify the nullability of table columns when creating a table, declaring a temporary table, or defining a table variable.

Additional information

By following this rule, you provide clarity about the expected behavior of the columns regarding null values, which enhances the understanding of the table structure and facilitates data integrity. Additionally, explicitly defining nullability helps prevent potential errors and inconsistencies in data manipulation operations.

Noncompliant code example

CREATE TABLE dbo.DemoTable(Code VARCHAR(128))
GO

Compliant solution

CREATE TABLE dbo.DemoTable(Code VARCHAR(128) NULL)
GO
 
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?