Hello readers, Here are going to create a Check Constraint in SQL Server to allow only Alphabets in Column.

Check Constraint in SQL Server to  in the column:

Sometimes you face a situation to allow alphabets in columns. This is the real-world scenario.  Here I am going to create a Check Constraint that will prevent any character other than Alphabets.

Example:

Create Table:

CREATE TABLE EmployeeDetails
(ID INT, EmployeeName VARCHAR(100),
CONSTRAINT chkEmployeeName CHECK (EmployeeName NOT LIKE '%[^A-Z]%'))
GO

In the above script, i have created a Check Constraint called chkEmployeeName that will check if EmployeeName is not an Alphabet.

Test Check Constraint:

INSERT INTO [dbo].[EmployeeDetails] (ID, EmployeeName)
VALUES (1, 'DebugOnWeb')
GO

If you run the above run the above query it will run without any error, Now run the following query.

INSERT INTO [dbo].[EmployeeDetails] (ID, EmployeeName)
VALUES (1, 'DebugOnWeb 1')
GO

If you run the above following error will be raised.

Allow only Alphabets

So this simple Constraint solve the problem of allowing Alphabets in column

View More:

Conclusion:

I hope this Check Constrain of allowing only Alphabets in the column will solve your real-world problems. I would like to have your feedback, comments, and suggestions.

Thank You.

60 Comments

  • Throughout this great pattern of things you actually secure an A just for hard work. Where exactly you lost me personally was on your facts. You know, it is said, the devil is in the details… And that couldn’t be more correct at this point. Having said that, let me inform you what did work. Your text is certainly very engaging and that is possibly the reason why I am making the effort in order to comment. I do not really make it a regular habit of doing that. 2nd, despite the fact that I can notice a leaps in logic you come up with, I am not really certain of how you appear to connect the ideas that make your conclusion. For right now I will yield to your issue however trust in the future you link your facts better.

  • What’s up to every , since I am truly keen of reading this blog’s post to be updated daily. It consists of good material.|

  • Hello, its pleasant paragraph regarding media print, we all be aware of media is a impressive source of information.|

  • Aw, this was a very nice post. In idea I wish to put in writing like this moreover – taking time and precise effort to make an excellent article… but what can I say… I procrastinate alot and not at all appear to get something done.

  • Hi there, I found your site via Google whilst searching for a comparable matter, your site came up, it looks good. I have bookmarked it in my google bookmarks.

  • Hmm it seems like your blog ate my first comment (it was extremely long) so I guess I’ll just sum it up what I submitted and say, I’m thoroughly enjoying your blog. I as well am an aspiring blog writer but I’m still new to everything. Do you have any suggestions for rookie blog writers? I’d genuinely appreciate it.

  • Hey there! I just wanted to ask if you ever have any trouble with hackers? My last blog (wordpress) was hacked and I ended up losing several weeks of hard work due to no back up. Do you have any methods to protect against hackers?

  • The Best Places To Date Hookup Ladies

    The amount of hookup girls first individual is typically small, and that means once you hire a company who is pretty much like yourself in all regards, chances are high they are also probably be an excellent match up to suit your needs https://wikihookup.com/gay-hookup-vet What if you don’t have a lot good fortune with online hookups? Well, there are more approaches that you could go about locating someone to hookup with. Although these techniques will not be as fast as employing dating online, they can be less complicated and are often cheaper, which definitely ensures they are a workable option.

    Cost-free Hookup Women: One thing you can do is usually to appear online for any free courting web site. Usually these sites are strictly for single individuals, but there are many sites that serve married couples or friendships too. When they are not specifically designed for hookups, you may still find some excellent prospects at free of charge hookups. This is probably not an ideal way for you to fulfill a hookup, but it may be a good approach to finding out if it individual is somebody who you would feel comfortable with internet dating or connecting with on a far more permanent basis.

    Compensated Courting Solutions: You will find on-line services like hookup colder and Zoosk which are free of charge to enroll in. They have got both paid and totally free models, and each of them have their own individual positive aspects. Some of the advantages of a compensated support incorporate because you know exactly what you really are entering into before you even log in in your account, meaning that you have more control within the scenario, and if you choose not to go with it, you are able to stop at any time.

    Live Online Hookups: There are certainly many countries where online hookup providers are very common. India is among these countries. In India, numerous teenagers, especially one young girls, will benefit from the internet to discover somebody to experience a one evening stand with. In lots of parts of Asia, individuals will check out karaoke cafes and general public dances and try to meet an individual for a particular date. There is a lot of sex engaged in fact it is perfectly suitable in many Asian ethnicities.

    In the usa, hookup online dating sites are gaining popularity. It is because they give a simple way for individuals coming from all walks of life to get anyone to particular date. Since several dating sites cost a tiny monthly fee, there is absolutely no reason that anyone who has an interest in finding someone should struggle to do this on the web at no cost. It really is less hazardous than conference face-to-face, and it enables you to be in the security of your residence. By using these solutions, you can actually search through user profiles and see if you find any person that you are attracted to.

    Transunion: As outlined above, hookup courting on-line has its own downsides. The demise than it is it is extremely very easy to rest relating to your age group, earnings, or marriage position. Because of this, you might end up shelling out months looking to get the best match up. Among the best professional services for locating matches for queers is TransUnion. The great thing regarding this is that you may get credit report checks, pay minimal, and in some cases you will get fast credit rating acceptance.

    I might definitely suggest these three services as the simplest way to hookup with females. When you would rather use free of charge internet dating sites, be sure you do your research before signing up. Some websites are bogus, deceptive, and might trigger injury to your future. Recall to learn the privacy policy and regulations in the internet site, and make sure that the internet site has been in existence for a serious although. Every one of these factors will help you find the best service for your requirements.

    Hookups with women is the best way to meet up with a new partner and practical experience a brand new culture. If you are looking so far a woman on the internet, be aware that there are numerous fraudulent dating sites. The best advice is to look into the Better Company Bureau before using any online dating services. It’s always wise to be safe than sorry. Regardless of whether you want to use on the web hookup providers or otherwise not, there are plenty of people who are searching for a romantic relationship such as you.

  • I like what you guys are up also. Such intelligent work and reporting! Carry on the superb works guys I have incorporated you guys to my blogroll. I think it will improve the value of my web site 🙂

  • Do you have a spam issue on this site; I also am a blogger, and I was wanting to know your situation; many of us have developed some nice procedures and we are looking to swap methods with other folks, be sure to shoot me an e-mail if interested.

  • Aw, this was a really nice post. In idea I wish to put in writing like this moreover – taking time and precise effort to make a very good article… but what can I say… I procrastinate alot and by no means seem to get one thing done.

  • I have been exploring for a little for any high quality articles or weblog posts in this kind of area . Exploring in Yahoo I at last stumbled upon this web site. Studying this info So i am glad to convey that I’ve an incredibly excellent uncanny feeling I found out just what I needed. I such a lot indubitably will make sure to do not overlook this site and give it a look on a continuing basis.

  • Please let me know if you’re looking for a article author for your site. You have some really great articles and I think I would be a good asset. If you ever want to take some of the load off, I’d absolutely love to write some content for your blog in exchange for a link back to mine. Please shoot me an email if interested. Many thanks!|

  • Great work! This is the type of information that should be shared around the internet. Shame on the search engines for not positioning this post higher! Come on over and visit my web site . Thanks =)

  • Great – I should definitely pronounce, impressed with your website. I had no trouble navigating through all tabs and related info ended up being truly easy to do to access. I recently found what I hoped for before you know it in the least. Reasonably unusual. Is likely to appreciate it for those who add forums or anything, website theme . a tones way for your client to communicate. Nice task..

  • My coder is trying to convince me to move to .net from PHP. I have always disliked the idea because of the costs. But he’s tryiong none the less. I’ve been using Movable-type on several websites for about a year and am worried about switching to another platform. I have heard very good things about blogengine.net. Is there a way I can transfer all my wordpress content into it? Any kind of help would be really appreciated!|

  • F*ckin’ amazing things here. I’m very satisfied to peer your article. Thank you so much and i’m looking ahead to contact you. Will you please drop me a e-mail?

  • 842246 582872Right after study a few with the content material for your internet site now, i genuinely as if your technique of blogging. I bookmarked it to my bookmark web site list and are checking back soon. Pls have a appear at my web site too and told me in the event you agree. 291585

  • I am no longer certain the place you’re getting your information, but good topic. I needs to spend a while learning more or figuring out more. Thanks for wonderful info I was on the lookout for this information for my mission.|

  • Magnificent goods from you, man. I have understand your stuff previous to and you’re just too fantastic. I really like what you’ve acquired here, really like what you’re saying and the way in which you say it. You make it entertaining and you still take care of to keep it smart. I can’t wait to read much more from you. This is really a terrific website.|

  • 486989 695724Im glad I located your post. I would never have made sense of this subject on my own. Ive read several other articles on this topic, but I was confused until I read yours. 600858

  • Hello there, I think your website could be having web browser compatibility issues. When I take a look at your web site in Safari, it looks fine but when opening in Internet Explorer, it has some overlapping issues. I just wanted to give you a quick heads up! Other than that, wonderful blog!|