Solved

COLLATE, Compatibility_50_409_0, and CLUSTERED

Posted on 2009-04-13
2
248 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 300 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 142

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 150 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

773 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