DataGrip
 
Get DataGrip
You are viewing the documentation for an earlier version of DataGrip.

Code Inspection: Insert NULL into NOT NULL column

Last modified: 13 May 2022

Reports cases when you insert NULL values into columns that accept only NOT NULL values.

Example (Microsoft SQL Server):

You cannot insert NULL values in col1 and col2 because they are defined as NOT NULL. If you run the script as is, you will receive an error. To fix this code, replace NULL in the VALUES part with some values (for example, 42 and 'bird').