Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

COLLATE, Compatibility_50_409_0, and CLUSTERED

Posted on 2009-04-13
2
Medium Priority
?
255 Views
Last Modified: 2012-05-06
Hi,

I have an MS-SQL create table script and I need to decipher it a bit, and I need help in figuring out the meaning of 3 things....

1-COLLATE     (150 points)
2-Compatibility_50_409_0     (150 points)
3-CLUSTERED     (150 points)

If possible, please try to explain in laymans terms. (see below the sp)
CREATE TABLE [WorkDone] 
(
	[BatchName] [char] (15) COLLATE Compatibility_50_409_0 NOT NULL ,
	[ScannedDate] [datetime] NOT NULL ,
	CONSTRAINT [PK_ScannedBatch] PRIMARY KEY CLUSTERED 
	(
		[BatchName]
	)  ON [PRIMARY] 
) ON [PRIMARY]
GO

Open in new window

0
Comment
Question by:silentthread2k
2 Comments
 
LVL 22

Accepted Solution

by:
dportas earned 1200 total points
ID: 24132992
The COLLATE keyword followed by the collation name ("Compatibility_50_409_0") defines the sort order and case-sensitivity of a character column. I haven't come across Compatibility_50_409_0 before but going by the name it looks like it is used for backwards compatibility purposes.

CLUSTERED defines the type of index created for the primary key constraint of this table. Indexes can be either clustered or non-clustered. The difference is in the internal structures used to store index and data pages. You can read details here:
http://msdn.microsoft.com/en-us/library/ms177443.aspx
0
 
LVL 143

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 600 total points
ID: 24133220
I found that a sql 6.5 with great plains installed and then upgraded to sql 7 etc could result in that compatibility value: Compatibility_50_409_0
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lotus Notes has been used since a very long time as an e-mail client and is very popular because of it's unmatched security. In this article we are going to learn about  RRV Bucket corruption and understand various methods to Fix "RRV Bucket Corrupt…
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question