?
Solved

I have a ms sql database I would like to make one colounm case sensitive it is a password colounm how can I do that

Posted on 2011-04-26
3
Medium Priority
?
201 Views
Last Modified: 2012-05-11
I have a ms sql database I would like to make one colounm case sensitive it is a password colounm how can I do that

ms sql server 2000
0
Comment
Question by:1030071002
3 Comments
 
LVL 33

Accepted Solution

by:
knightEknight earned 668 total points
ID: 35467821
The column will store what ever you put in it (upper or lower case, or mixed), but to do a case-INsensitive compare, do this:

declare @prmPassword varchar(128)
select  @prmPassword = 'myTestPassword'

select *
from myTable
where  @prmPassword = myPasswordColumn COLLATE Latin1_General_CS_AS
0
 
LVL 6

Assisted Solution

by:bull_rider
bull_rider earned 664 total points
ID: 35467828
ALTER TABLE ALTER COLUMN allows to change collation for a single column:

alter table Foo alter column Bar ntext collate Latin1_General_CS_AS
0
 
LVL 9

Assisted Solution

by:sarabhai
sarabhai earned 668 total points
ID: 35469164
you can use collate at time comparison or make that column collation as case sensitive.

or

it is suggestion

do not store password in database as it is....
you may use other options.
   
0

Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Screencast - Getting to Know the Pipeline

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question