In this tutorial, we are going to learn Case Sensitive Search in SQL Server. Many applications need the functional requirement that they need to make a Case Sensitive Search for example UserName and password.

Introduction:

The default collation for SQL Server is not case sensitive however it is possible to collation of any column of a table to make it Case Sensitive.

To check collation of SQL Server, run this query:

SELECT SERVERPROPERTY('COLLATION')

Output:

SQL_Latin1_General_CP1_CI_AS

Where;

CI specified Case Insensitive.

Case Sensitive Search in SQL Server:

Create Table:

Create TABLE [dbo].[CaseSensitiveSearch]
(
CaseSensitiveColumn VARCHAR(100)
)

Insert Records:

INSERT INTO [dbo].[CaseSensitiveSearch] ([CaseSensitiveColumn])
VALUES
('Debugonweb')
INSERT INTO [dbo].[CaseSensitiveSearch] ([CaseSensitiveColumn])
VALUES
('debugOnweb')
INSERT INTO [dbo].[CaseSensitiveSearch] ([CaseSensitiveColumn])
VALUES
('DebugonWeb')
INSERT INTO [dbo].[CaseSensitiveSearch] ([CaseSensitiveColumn])
VALUES
('DebugOnWeb')
INSERT INTO [dbo].[CaseSensitiveSearch] ([CaseSensitiveColumn])
VALUES
('debugonweb')
INSERT INTO [dbo].[CaseSensitiveSearch] ([CaseSensitiveColumn])
VALUES
('DEBUGONWEB')

You can see I have inserted records in different cases. I will run a simple query with a simple condition on CaseSensitiveColumn.

SELECT * FROM [dbo].[CaseSensitiveSearch] WHERE [CaseSensitiveColumn]='DebugOnWeb'

Case Sensitive Search

This query will return all 6 rows rather than the matching value based on the case. If I want to Search records based on Case then we need to change the query as follows:

SELECT * FROM [dbo].[CaseSensitiveSearch] WHERE [CaseSensitiveColumn] COLLATE Latin1_General_CS_AS='DebugOnWeb'

Case Sensitive Search

To Add a collation to any column use the following query:

Create TABLE [dbo].[CaseSensitiveSearch]
(
CaseSensitiveColumn VARCHAR(100) COLLATE
Latin1_General_CS_AS

)

To change the collation of any column for any table permanently run following query.

ALTER TABLE  [dbo].[CaseSensitiveSearch]
ALTER COLUMN CaseSensitiveColumn  VARCHAR(100)
COLLATE Latin1_General_CS_AS

View More:

Conclusion:

I hope you understand how to make Case Sensitive Search in SQL Server. I would like to have your feedback, comments, and suggestions.

Thank You.

25 Comments

  • Hi,

    I am contacting you today because I have jackpotbetonline.com site for advertising.

    Please check the websites where you can purchase advertising.

    jackpotbetonline.com are Daily updated & have good DA & DR.

    The following advertising options are available:

    . Text Links
    . Article Posting (max of 3 links per article)
    . Advertising Banner Space (468×60 or 250×250 banners)
    . “Best Online Casino slots” Review .

    Regards

  • a number of adult dating tactics it is critical to Date wok cookware girls

    absolutely, in order to faulty. don’t think wok cookware female are exactly the same with Hispanic or a white wine models. They will vary. they are yet to many kinds of ethnics, noteworthy characteristics, desires, desires, taste, pastimes, also and more. when you are seeing an oriental great women, You should learn these procedures. If you employ the same law of commerce that you intend to used as much as now the european the ladies, it’s not possible to be successful with additional blood gets due to an wok cookware female.

    japanese older women live in a wealthy u. s,world so they are usually cheaply firm. much of japoneses young girls really are independent, an active person, not to mention substantial. filipino young ladies are wide and varied. they can get wed by working with outdated men of all ages who often requires excellent care of them but aspect them. far eastern girls can be found admired as a result of her or his incredible feel and femininity. under,a number of like better to get marital when it comes to good old men and women. every asiatische location takes a different approach from various other and they are different from oriental countries nicely as. the case, if you are a asian man or woman who happens to be living under western culture for an extended time, You should try to learn a certain civilization before big day a lady in something continent. commonly do not are applicable your identical rule as you night collectively youthful lady. As how to tell if a chinese woman likes you restoration most of cookware females have become insightful and / or loyal around like love affair. This is amongst the same functions of the fact that hard anodized cookware women have.

    all ready oriental daughters, online dating sites provide the best method for single men in the hunt for asiatische men and women. uniform dating software is best proposal in looking for your love live on the internet. realize mister. properly or maybe microsoft. the right way, you will pick a personal summary planned within the. this process personal teaches who you’re really and additionally who you are looking for. one can find thousands if not thousands of asian kitchenware pregnant women disclosed at those people these dating sites. They are generally existing living in the united states or north west locations or perhaps asia. specific town’s fernrrstliche young women what person are living in british, Vietnam, the far east end up with english words troubles but most of filipino a lot of women have a tendency. gals in Philippines utter a word words with complete confidence so is available no challenge with the lingo at the time dating site men in the western world.

    asiatische women are truly genial, enjoyable, candid, moreover dependable to love romantic relationship. believe that in a single girlfriend one man alliance will be the foremost. most people want a life long break up. known an asian kitchenware partner, you should know some kind of going out things. asian kitchenware young females are actually timid in initiation just may possibly feel relaxed as they be realise you actually. as an example, Some hard anodized cookware teens cannot answer some regarding your a challenge completely love doubts also supply smile which can answer back for the solution. it rather be chased through the process of people in stead with pushing on the aspiration. many are not as activated as western side young girls. as soon as win your loved one cardiovascular, the woman with joining your downline always.

  • You know, a site https://pornoturedy.com that’s so awesome that it becomes the center of your porn interest and you start all of your searches there. The site has good categories and a porn star index, daily porn video selection and their catalog, and even a premium section.

  • Продажи с помощью Pinterest http://1541.ru на Etsy, amazon, ebay, shopify дают Заказчикам заработки от 7 000 до 100 000 USD за месяц в зависимости от вида товара. Приоритет handmade.Facebook, instagram,google ads – отстой по сравнению c пинтерестом в 99%

  • Why Deep Sleep is Important and How to Improve It? Resurge is a powerful potent fat burning formula by John Barban, which does not only work for melting off fat, but also regulates the sleep cycle too. In fact, this product only works when a person is in his deep sleep.
    https://bit.ly/2XE7HQU

  • Продажи с помощью Pinterest http://1541.ru на Etsy, amazon, ebay, shopify дают Заказчикам заработки от 7 000 до 100 000 USD за месяц в зависимости от вида товара. Приоритет handmade.Facebook, instagram,google ads – отстой по сравнению c пинтерестом в 99%

  • Здравствуйте.
    Посоветуйте путнюю типографию для изготовления листовок
    Могу посоветовать одну типографию , качество, цены и скорость у них отличное,
    но они размещаются в Красноярске, а мне хотелось бы в Москве.
    Это печать буклетов https://kraft-pt.ru/products/buklety