SQL: NULL value

This entry is part 18 of 20 in the series SQL Tutorial

create table artist
	(
 id int auto_increment primary key, 
 artiste varchar(30) not null, 
 album varchar(50),
 year int(10)
 );

When creating a table, we can impose a not null value constraint to a column.

The attribute not null specifies that the column cannot contain the null value. NULL is a special value indicating “no value”.

As shown in the below screenshot, a error message column cannot null value is generated.

null

Series Navigation<< SQL: Limit and Order By
SQL: Select null value >>