ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Databases  >>  SQL Server
 
 


 

 
 Oracle interview questions  Oracle Interview Questions
 SQL Server interview questions  SQL Server Interview Questions
 MS Access interview questions  MS Access Interview Questions
 MySQL interview questions  MySQL Interview Questions
 Postgre interview questions  Postgre Interview Questions
 Sybase interview questions  Sybase Interview Questions
 DB Architecture interview questions  DB Architecture Interview Questions
 DB Administration interview questions  DB Administration Interview Questions
 DB Development interview questions  DB Development Interview Questions
 SQL PLSQL interview questions  SQL PLSQL Interview Questions
 Databases AllOther interview questions  Databases AllOther Interview Questions
Question
What is the purpose of using COLLATE in a query?
 Question Submitted By :: Latha Sree
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is the purpose of using COLLATE in a query?
Answer
# 1
The term, collation, refers to a set of rules that determine
how data is sorted and compared. In Microsoft? SQL Server
2000, it is not required to separately specify code page and
sort order for character data, and the collation used for
Unicode data. Instead, specify the collation name and
sorting rules to use. Character data is sorted using rules
that define the correct character sequence, with options for
specifying case-sensitivity, accent marks, kana character
types, and character width. Microsoft SQL Server 2000
collations include these groupings: 
?	Windows collations - Windows collations define rules for
storing character data based on the rules defined for an
associated Windows locale. The base Windows collation rules
specify which alphabet or language is used when dictionary
sorting is applied, as well as the code page used to store
non-Unicode character data. For Windows collations, the
nchar, nvarchar, and ntext data types have the same sorting
behavior as char, varchar, and text data types 
?	SQL collations - SQL collations are provided for
compatibility with sort orders in earlier versions of
Microsoft SQL Server. 
Sort Order
Binary is the fastest sorting order, and is case-sensitive.
If Binary is selected, the Case-sensitive, Accent-sensitive,
Kana-sensitive, and Width-sensitive options are not available. 
 
Sort order	Description
Binary	Sorts and compares data in Microsoft? SQL Server?
tables based on the bit patterns defined for each character.
Binary sort order is case-sensitive, that is lowercase
precedes uppercase, and accent-sensitive. This is the
fastest sorting order. 
If this option is not selected, SQL Server follows sorting
and comparison rules as defined in dictionaries for the
associated language or alphabet.
Case-sensitive	Specifies that SQL Server distinguish between
uppercase and lowercase letters. 
If not selected, SQL Server considers the uppercase and
lowercase versions of letters to be equal. SQL Server does
not define whether lowercase letters sort lower or higher in
relation to uppercase letters when Case-sensitive is not
selected.
Accent-sensitive	Specifies that SQL Server distinguish
between accented and unaccented characters. For example, 'a'
is not equal to '?'. 
If not selected, SQL Server considers the accented and
unaccented versions of letters to be equal.
Kana-sensitive	Specifies that SQL Server distinguish between
the two types of Japanese kana characters: Hiragana and
Katakana. 
If not selected, SQL Server considers Hiragana and Katakana
characters to be equal.
Width-sensitive	Specifies that SQL Server distinguish
between a single-byte character (half-width) and the same
character when represented as a double-byte character
(full-width). 
If not selected, SQL Server considers the single-byte and
double-byte representation of the same character to be equal. 
Windows collation options: 
?	Use Latin1_General for the U.S. English character set
(code page 1252). 
?	Use Modern_Spanish for all variations of Spanish, which
also use the same character set as U.S. English (code page
1252). 
?	Use Arabic for all variations of Arabic, which use the
Arabic character set (code page 1256). 
?	Use Japanese_Unicode for the Unicode version of Japanese
(code page 932), which has a different sort order from
Japanese, but the same code page (932). 
 
Is This Answer Correct ?    2 Yes 0 No
Guest
 

 
 
 
Other SQL Server Interview Questions
 
  Question Asked @ Answers
 
What is the purpose of using COLLATE in a query?  1
Can we create clustered index on non primary key column CTS14
how to select 5 to 7 rows from a table, which contains 10 rows? IBM14
1.what is the purpose of using alias name in sql server? with certain example? 2.what is cursor?will u plz explain me in detail with certain example?  3
I am having table Title with TITLE id,Author ID, Publiser ID , table AUTHOR with Author ID, Author Name, table PUBLISER with Pub ID, Pub name Here hot to find out the publiser id who have relesed the books of patriticular author?  3
What is the Query of getting last 10 transaction Reports (like insert, update, Delete Data from Tabele) ? Wipro4
how can i store resumes in database? HCL2
UPDATE statement can on a single table or on the multiple table? iGate5
how to get 25th row in any table in sqlserver can u tell me syntax  4
how to find number of columns in a table in sql server 2000 and 2005 also Virtusa7
How to tune a stored procedure?  5
how to rename the table  3
Let us say the SQL Server crashed and you are rebuilding the databases including the master database what procedure to you follow?  2
How do you simulate a deadlock for testing purposes  1
what is normalization? what is denormalization? Satyam5
what is index seek and index scan?  2
can you any body tell me the difference between candidate key and primary key  4
what is a cursor and what is its use?  1
in tabase table having a column in it empname field is there which having 5 duplicate values is there i want deleted all the duplicates i want showing only one name only.  7
What are the OS services that the SQL Server installation adds?  1
 
For more SQL Server Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com