Using Checks

Using Checks

One of the handy tools regarding the constraint in SQL Server is check.
This simple, but powerful, tool allows us to use column based constraints on the data.
Say you have a table with age column. If you want to add constraint on age for values less than or equal to zero and above 100 – thinking we would live 100 years…
ALTER TABLE tbl ADD CONSTRAINT age_constraint CHECK(age < 100);
That is all.
If I try to run a query like this..
INSERT INTO tbl (age,..) VALUES (-12);
Then the engine would tell me that this cannot happen.

Force redirect http to https using htaccess

You don’t have permission to access / on this server. Apache error

Apache Not Service Files from Icons Folder

Create Tables From Entity Definitions From JPA Spring

spring error ClassNotFoundException org.springframework.web.context.ContextLoaderList

The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*