The best way to insert valid data in database is with the constraints. It is also known as data enhancing,data enforcing or data integrity. We already know that SQL Server has different types of constraints. They are

I am going to explain these points below with a small demo

If we are trying to insert a second record with the marks of a value of 400 then when we run the above insert query it gives an error because: