sqlnaive (6/19/2013)In a normal scenario it should be considered as the default behaviour for the question which is CI (and not CS).

I disagree, and I'll tell you why.

In questions where collation is not a factor, using the consistent case throughout the question prevents ambiguity. If you ensure the question works okay onm a CS collation, it will also be okay on a CI collation. The reverse is not true. So writing the question for a CS collation is the best way to ensure that everyone has a fair chacne - including those who are aware that not all SQL Server instances in the world are installed on a CI collation.

And in questions where collation is a factor, the collation should always be included in the question, so there can never be a problem there.

Although I agree that it is probably a good idea to specify the collation when it is relevant (i.e. when it affects the answer to the question) I also have my doubts about it. After all, case-sensitive collations are an absolute pain for almost all purposes, so it might be a good idea to get people whose servers are set up with case-sensitive collations to suffer a little extra pain in QOTD in the hope that this might encourage them not to use the horrible things in the future.

L' Eomot Inversé (6/19/2013)After all, case-sensitive collations are an absolute pain for almost all purposes, so it might be a good idea to get people whose servers are set up with case-sensitive collations to suffer a little extra pain in QOTD in the hope that this might encourage them not to use the horrible things in the future.

A production server should be installed with the collation that best fits the application(s) it will support. If that means case sensitive, than that is the best collation, and not a horrible thing at all.A dev server that is used to develop for deployment on a specific server should be installed with the same collation as where the code will eventually be deployed.

And dev servers that are used to develop code that may be deployed "anywhere" should always be installed with case sensitive collations, as that avoids making mistakes taht can be very costly (and a royal pain in the backside) to fix later. If your dev server is case sensitive, you'll get slapped immediately when messing up the case of object names, and you'll soon learn not to make those mistakes. If your dev server is case insensitive, you will, eventually, get sloppy with upper- and lowercase. And you will not notice that, not even get a warning, during any of your tests. Even your first deployments may go right - until your database is sold to a customer who is running SQL on a case sensitive collation, and he reports errors all the time. Fun! (not!)

L' Eomot Inversé (6/19/2013)After all, case-sensitive collations are an absolute pain for almost all purposes, so it might be a good idea to get people whose servers are set up with case-sensitive collations to suffer a little extra pain in QOTD in the hope that this might encourage them not to use the horrible things in the future.

A production server should be installed with the collation that best fits the application(s) it will support. If that means case sensitive, than that is the best collation, and not a horrible thing at all.A dev server that is used to develop for deployment on a specific server should be installed with the same collation as where the code will eventually be deployed.

And dev servers that are used to develop code that may be deployed "anywhere" should always be installed with case sensitive collations, as that avoids making mistakes taht can be very costly (and a royal pain in the backside) to fix later. If your dev server is case sensitive, you'll get slapped immediately when messing up the case of object names, and you'll soon learn not to make those mistakes. If your dev server is case insensitive, you will, eventually, get sloppy with upper- and lowercase. And you will not notice that, not even get a warning, during any of your tests. Even your first deployments may go right - until your database is sold to a customer who is running SQL on a case sensitive collation, and he reports errors all the time. Fun! (not!)

So, I guess I do not agree with you.

The only advantage of case-sensitive collation is that programmers should write statements with the right case. But changing a collation for an application never is a good idea. Swithing CI with CS or viceversa leads to many problems.I work with both: old thirdy-part application uses CI and the new one CS.I prefer case INSENSITIVE.

michlimes (6/6/2013)default collation is choosen at installation process - so imo it could be CS_AS.

You can override the installation defaults when doing the installation. Then you don't have a default installation any more, you have a non-default one. So the word "default" is a bit ambiguous - the server default in your instance is not the installation default.

However, I think you are right to suggest that the collation should always be specified in a QotD when it is relevant.

Easy question, as long as I ignore the fact that some instances may require case sensitivity because of the applications using the db (well... not written by me, but probably a bought application that is converted from Oracle where it's more common to use case sensitivity) .