开发学院数据库MSSQL Server sql server 2005 排序规则与大小写敏感 阅读

sql server 2005 排序规则与大小写敏感

 2007-11-11 12:54:23 来源:WEB开发网   
核心提示:If you installed sql server(WINDOWS平台上强大的数据库平台) 2005 Full !When Your Run Follow:use AdventureWorksgoselect * from sales.customer it's error!why?select *

If you installed  sql server(WINDOWS平台上强大的数据库平台) 2005  Full  !

When Your Run Follow:
--------------------------------
use AdventureWorks
go
select * from  sales.customer ----it's error!why?
select * from  Sales.Customer----it's right!
---------------------------------

This issue is related to your database collation setting.

You can try run this to find out what your database collation is:

SELECT databasepropertyex(AdventureWorks','collation')

The collation of your database makes your query case sensitive.

If you want a quick change,  you can change your database to another collation which is not case sensitive, for examle:

ALTER DATABASE AdventureWorks COLLATE SQL_Latin1_General_CP1_CI_AS

You can search Books online for more information on collation.

AND
There are some limitations on altering collation of a database, maybe there are some SCHEMABINGING views in the database. you can refers to SQL2005 Books Online, and locate:

'ALTER DATABASE (Transact-SQL)' topic ->'Remarks' section->'Changing the Database Collation'.

Tags:sql server 排序

编辑录入:coldstar [复制链接] [打 印]
[]
  • 好
  • 好的评价 如果觉得好,就请您
      0%(0)
  • 差
  • 差的评价 如果觉得差,就请您
      0%(0)
赞助商链接