Home All Groups Group Topic Archive Search About

significance of COLLATE

Author
21 Jul 2006 6:56 PM
steve02a
What is the significance of COLLATE in a database script file?

I have db script I use for a piece of software I've created - and I
have (and understand its meaning:

COLLATE SQL_Latin1_General_CP1_CI_AS

My DB works with or without that statement - so I'm trying to figure
out the significance of having it or not having it.  I guess I'm having
difficulty in understanding why I even need it in the first place (even
though I do know what it's used for).

Author
21 Jul 2006 7:25 PM
Omnibuzz
It basically decides the ordering of the data and whether the database or
whatever object to which its applied is case sensitive. The different types
of collations can be found by this query, it gives the discription too.

select * from ::fn_helpcollations()

CI = case insesitive.
AS = Accent sensitive.

--
-Omnibuzz (The SQL GC)

http://omnibuzz-sql.blogspot.com/
Author
21 Jul 2006 7:30 PM
Arnie Rowland
There is a Server level collation default;
a database can have a different collation default,
a table can have a different collation default,
a column can have a different collation,
AND you can even use the collation indicator in a query to affect the order
for that specific query.

When you use various tools, EM/QA, to script out databases, tables, etc. the
collation for that object is included -EVEN if it is the same for the
database -which can be helpful if you execute that script creating the
object in another server/database and the object specific collation is
important to preserve.

--
Arnie Rowland
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous


<steve***@gmail.com> wrote in message
Show quote
news:1153508170.750869.147370@b28g2000cwb.googlegroups.com...
> What is the significance of COLLATE in a database script file?
>
> I have db script I use for a piece of software I've created - and I
> have (and understand its meaning:
>
> COLLATE SQL_Latin1_General_CP1_CI_AS
>
> My DB works with or without that statement - so I'm trying to figure
> out the significance of having it or not having it.  I guess I'm having
> difficulty in understanding why I even need it in the first place (even
> though I do know what it's used for).
>

AddThis Social Bookmark Button