Error validating check constraint sql server

I wanted to add a check constraint to one of the fields called state but I keep getting the same error.I then click add on the check constraint dialogue and in the expression caption I input the following: I am using a book and have straight copied the above example from the book.One of the key goals when building applications is to make sure the data you enter into the database meets all your business rules.Data validation is a critical part of your application to ensure your data meets the requirements developed by your business analysts.I have tried everything I can think of and I cannot seem to get check constraints to work. I have checked the examples a thousand times, the syntax is definately correct.

Depending on your validation, rule requirement will determine where and how you will need to build your application to ensure your data is properly validated.In this article, I’m going to discuss how you can use database “check constraints” to validate your data within the SQL Server database engine.

uefa-europa-league.ru

89 Comments

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>