Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

case sensitive 1

Status
Not open for further replies.

MattNeeley

IS-IT--Management
Mar 7, 2004
94
US
I know that you can add records and it'll keep track of case like UserName, but can you have it so you can have two records like Username and UserName? just the case as the difference?
 
Is it field names or field values you're talking about? If it's field names, then Bastien's right, it can't be done.

Case-sensitive field values are another matter though.

If the field is not uniquely-indexed, then you can use ordinary CHAR fields but use case-sensitive comparisons:
[tt]
SELECT * FROM tbl WHERE fld = BINARY 'FldVal'
[/tt]

If the field is uniquely-indexed, or you want all comparisons of the field to be case-sensitive, you can simply use the BINARY attribute in the field declaration:
[tt]
fld CHAR(10) BINARY
[/tt]



-----
ALTER world DROP injustice, ADD peace;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top