What is Not Null Constraint
- Get link
- X
- Other Apps
Not Null Constraint
Database many have same mandatory attributes
.Ex-mobile no, email Id, Address is mandatory when new user for the registration, These attributes in a database are not allowed null in values
.In a student table, student first name and last name are mandatory are middle name many be optional
.syntax-Create table table name (column name datatype (size) not null
.Create table student (first name varchar (255) not null, middle name, varchar (255), last name varchar (255) not null);
.In database management system inserting null values can prevent by using not null constraint, same attributes in database are not allowed to contain null values that null value are unknown or missing same in attribute value in above example student first name and last name is not null there fore first name column and last name column required
- Get link
- X
- Other Apps
Comments
Post a Comment