SQL Not Null

SQL NOT NULL constraint just enforces a column to NOT accept NULL values, means always contain a value.

SQL NOT NULL Constraint Example

Here is an example of NOT NULL Constraint in SQL. The following SQL enforces the column "StudentID" not to accept NULL values

   StudentID   INT          NOT NULL,
   Name  CHAR (25) , 
   Address  CHAR (25) , 
   PRIMARY KEY (StudentID)

SQL Online Test

« Previous Tutorial Next Tutorial »

Like/Share Us on Facebook 😋