SQL Server Transact Basic to Expert - Create Table Query with NotNull

This blog is extension of the earlier one on creating a table with values not null. Using Not null we can enforce the column not to have a null value or to maintain the nullability based on the requirement

Syntax:

Create Table Databasename.Tablename
(Column1 datatype not null, Column2 datatype not null, )

Example:

Create table emptable
(empid int Not Null, empname varachar(50) Not Null)
Next Recommended Reading SQL server Interview queries