SQL SERVER 的排序规则说明

本文介绍了SQL Server中排序规则(SQL Collation)的相关概念及其使用方法,包括如何查询当前数据库的默认排序规则、解释特定排序规则(如'SQL_Latin1_General_CP1_CI_AI')的含义,并提供了检查表中特定列排序规则的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Version: 2008


SELECT SERVERPROPERTY('Collation') --check the default orderof current database

SELECT * FROM ::fn_helpcollations() where name = 'SQL_Latin1_General_CP1_CI_AI'-- explanation of 'SQL_Latin1_General_CP1_CI_AI'

SELECT collation FROMsyscolumns whereid=object_id(N'tablename')  ---check the default order of table ‘pick_list’ columns

Explanation of 'SQL_Latin1_General_CP1_CI_AI': CP1 specifies code page 1252, CIspecifies case-insensitive, AI specifies accent-insensitive

 

Explanation of Code Page and Windows-1252:

http://en.wikipedia.org/wiki/Code_page

 

http://en.wikipedia.org/wiki/Windows-1252

 

http://technet.microsoft.com/en-us/library/aa176553%28v=sql.80%29.aspx

COLLATE:  http://msdn.microsoft.com/en-us/library/aa258237%28v=sql.80%29.aspx

SQL Collation Name : http://technet.microsoft.com/en-us/library/aa258233%28v=sql.80%29.aspx

Windows Collation Designators : http://technet.microsoft.com/en-us/library/aa176553%28v=sql.80%29.aspx

排序规则相关帖子: http://bbs.youkuaiyun.com/topics/380194117

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值