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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COLLATE?

Status
Not open for further replies.

mkey

Programmer
Oct 3, 2001
288
CA
Hi All,
What is COLLATE? I tried to look for references in the BOL but failed to find any good explanations. Why do we use collate in a create table script? Any sort of explanation will help!
Regards,
mkey!
 
I think collate is used when you want to change the default sort order. For example, you can use this option to determine whether the sorted order is case-sensitive.

I've never actually changed the default order myself, but that may just be my own inexperience.
 
after reading the BOL, SQL Server uses COLLATE command to identify the proper language to use. This is similar to setting the "Regional Settings" in a Windows environment (Start > > Settings > Control Panel > Regional Settings). Using the proper COLLATE command lets you set which language SQL Server uses (French, English, whatever). In that regard, it also affects sort order and comparison. If you type in an English 'A', you want it compared to all English letters, not Chinese (or other alphabet) letters. Likewise, you want it sorted by the English alphabet, not Greek or any other alphabet.

Hopefully, that's clearer than mud. :-D

-SQLBill
 
You'll find more explanation in SQL BOL if you use the keyword "COLLATIONS" rather than COLLATE. Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
Thank you all for your input! It was helpful!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top