Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

COLLATE, Compatibility_50_409_0, and CLUSTERED

Posted on 2009-04-13
2
Medium Priority
?
253 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

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

This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

730 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