Tuesday, 20 December 2011

Explain NOT NULL constraint in SQL Server.

The NOT NULL constraint is used not to accept NULL values in a column. This makes sure to add values at the time of adding and updating the records.
Ex :
Create Table Suppliers
(
Supplier_ID int NOT NULL,
Supplier_Name varchar (300) NOT NULL,
Address varchar (500),
City varchar (200)
)
This Query will make sure the “Supplier_ID” and “Supplier_Name” columns to not accept NULL values.

Labels:


Bookmark this Blog in your Favorites

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home