Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in SQL by (5k points)

I have listed down an SQL query to create the database in SQLServer below:

create database yourdb

on

( name = 'yourdb_dat',

  filename = 'c:\program files\microsoft sql server\mssql.1\mssql\data\yourdbdat.mdf',

  size = 25mb,

  maxsize = 1500mb,

  filegrowth = 10mb )

log on

( name = 'yourdb_log',

  filename = 'c:\program files\microsoft sql server\mssql.1\mssql\data\yourdblog.ldf',

  size = 7mb,

  maxsize = 375mb,

  filegrowth = 10mb )

COLLATE SQL_Latin1_General_CP1_CI_AS;

go

It is working very fine. 

I have confusion in this functionality: COLLATE SQL_Latin1_General_CP1_CI_AS.

Please guide me with.

1 Answer

0 votes
by (10.2k points)
edited by

It sets the sorting of the server:

SQL_Latin1_General_CP1_CI_AS

Splits into few parts:

  1. latin1 makes the server treat strings using charset latin 1, basically ascii

  2. CP1 stands for Code Page 1252

  3. CI case insensitive comparisons so 'ABC' would equal 'abc'

  4. AS accent sensitive, so 'ü' does not equal 'u'

I hope this would help you.

If you want to get more insights into SQL, check out this SQL Course from Intellipaat.

Related questions

Browse Categories

...