Interview Preparation mode beta
Funny Facebook Status Funny Facebook Status
Enter your email address

What does COLLATE Keyword in SQL signify, in MS SQL Server?

Nice?Vote!
asked 1 year ago in SQL Server Interview Questions and Answers by R (19,530 points) edited 1 year ago by R

3 Answers

Nice?Vote!
The COLLATE key word is used to set the collation of the database or table.
Collation:
Collation defines in the way that the data is sorted. we all know that creating indexes will sort the data in a particular order. There are various collation to sort the data it is normally used when we are storing multilingual data, like if our data is in Hindi then it cannot be sorted in A,B,C,D.... order rite? so there is a collation for Indic languages that defines in which order to sort the data.
answered 1 year ago by anonymous
Nice?Vote!
Collation is the basic criteria provided or incorporated on the table or database or on the column whether that particular object should have case sensitiveness or not.

CREATE TABLE [dbo].[sample](
                  [id] [int] IDENTITY(1,1) NOT NULL,
                  [name] [varchar](20) COLLATE SQL_Latin1_General_CP1_CS_AS NULL
) ON [PRIMARY]

name is the column which has the case sensitiveness propert.
answered 1 year ago by anonymous edited 1 year ago by R
Nice?Vote!
Clause that can be applied to a database definition to define the collation.
Syntax

COLLATE < collation_name >
< collation_name > :: =
< Windows_collation_name >
< Windows_collation_name >:: =
CollationDesignator_< ComparisonStyle >
< ComparisonStyle > :: =
CaseSensitivity_AccentSensitivity

Regards
Sridhar R
Nothing is illegal, Until You Get Caught
-Sridhar R
answered 1 year ago by anonymous

Related questions