How do we define collation sequence for database and tables

Q

How do we define collation sequence for database and tables?

✍: Guest

A

You can create a database with language specific collation sequence. For instance in the below create statement tblCustomer is created by Latin language collation sequence.
Create database tblCustomer collate Latin1_General_BIN
You can also create tables with particular collation sequence. Below is the create table syntax for the same.

Create table tblCustomer
(
[CustomerCode] char(10) COLLATE Albanian_CI_AI_KS_WS NULL,
[EntryDate] [char] (8) COLLATE Korean_Wansung_Unicode_CS_AS_KS NOT
NULL ,
[CustAbbrev] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL
)

2007-11-02, 4886👍, 0💬