照合順序関数 - COLLATIONPROPERTY (Transact-SQL)Collation Functions - COLLATIONPROPERTY (Transact-SQL)
適用対象:Applies to: SQL ServerSQL Server (サポートされているすべてのバージョン)
SQL ServerSQL Server (all supported versions)
Azure SQL データベースAzure SQL Database
Azure SQL データベースAzure SQL Database
Azure SQL Managed InstanceAzure SQL Managed Instance
Azure SQL Managed InstanceAzure SQL Managed Instance
Azure Synapse AnalyticsAzure Synapse Analytics
Azure Synapse AnalyticsAzure Synapse Analytics
Parallel Data WarehouseParallel Data Warehouse
Parallel Data WarehouseParallel Data Warehouse
SQL ServerSQL Server (サポートされているすべてのバージョン)
SQL ServerSQL Server (all supported versions)
Azure SQL データベースAzure SQL Database
Azure SQL データベースAzure SQL Database
Azure SQL Managed InstanceAzure SQL Managed Instance
Azure SQL Managed InstanceAzure SQL Managed Instance
Azure Synapse AnalyticsAzure Synapse Analytics
Azure Synapse AnalyticsAzure Synapse Analytics
Parallel Data WarehouseParallel Data Warehouse
Parallel Data WarehouseParallel Data Warehouse
この関数は、指定された照合順序の要求されたプロパティを返します。This function returns the requested property of a specified collation.
Transact-SQL 構文表記規則
Transact-SQL Syntax Conventions
構文Syntax
COLLATIONPROPERTY( collation_name , property )
注意
SQL Server 2014 以前の Transact-SQL 構文を確認するには、以前のバージョンのドキュメントを参照してください。To view Transact-SQL syntax for SQL Server 2014 and earlier, see Previous versions documentation.
引数Arguments
collation_namecollation_name
照合順序の名前です。The name of the collation. collation_name 引数は、nvarchar (128) データ型で、既定値はありません。The collation_name argument has an nvarchar(128) data type, with no default value.
propertyproperty
collation プロパティ。The collation property. property 引数は、varchar (128) データ型で、次のいずれかの値を持つことができます。The property argument has a varchar(128) data type, and can have any one of the following values:
プロパティ名Property name | 説明Description |
---|---|
CodePageCodePage | 照合順序の Unicode 以外のコード ページ。Non-Unicode code page of the collation. これは、varchar データで使用される文字セットです。This is the character set used for varchar data. これらの値を変換してその文字マッピングを確認するには、「Appendix G Mapping Tables」(付録 G: DBCS/Unicode マッピングテーブル) と「Appendix H Code Pages」(付録H: コード ページ) を参照してください。See Appendix G DBCS/Unicode Mapping Tables and Appendix H Code Pages to translate these values, and to see their character mappings. 基本データ型: intBase data type: int |
LCIDLCID | 照合順序の Windows ロケール ID。Windows locale ID of the collation. これは、並べ替えおよび比較規則に使用されるカルチャです。This is the culture used for sorting and comparison rules. これらの値を変換するには、「LCID Structure」(LCID 構造) を参照してください (最初に varbinary に変換する必要があります)。See LCID Structure to translate these values (you will first need to convert to varbinary). 基本データ型: intBase data type: int |
ComparisonStyleComparisonStyle | 照合順序の Windows 比較形式。Windows comparison style of the collation. (_BIN) と (_BIN2) の両方と、すべてのプロパティに区別がある場合 ((_CS_AS_KS_WS)、(_CS_AS_KS_WS_SC)、(_CS_AS_KS_WS_VSS))、バイナリ照合順序に対して 0 を返します。Returns 0 for binary collations - both (_BIN) and (_BIN2) - as well as when all properties are sensitive - (_CS_AS_KS_WS) and (_CS_AS_KS_WS_SC) and (_CS_AS_KS_WS_VSS). ビットマスク値:Bitmask values: 大文字と小文字を区別しない: 1Ignore case : 1 アクセントを無視する: 2Ignore accent : 2 ひらがなとカタカナを区別しない: 65536Ignore Kana : 65536 全角と半角を区別しない: 131072Ignore width : 131072 注: 比較動作に影響する場合でも、variation-selector-sensitive (_VSS) オプションはこの値では表されません。Note: the variation-selector-sensitive (_VSS) option is not represented in this value, even though it affects the comparison behavior. 基本データ型: intBase data type: int |
VersionVersion | 照合順序のバージョン。The version of the collation. 0 から 3 の間の値が返されます。Returns a value between 0 and 3. 名前に "140" が含まれる照合順序では、3 が返されます。Collations with "140" in the name return 3. 名前に "100" が含まれる照合順序では、2 が返されます。Collations with "100" in the name return 2. 名前に "90" が含まれる照合順序では、1 が返されます。Collations with "90" in the name return 1. 他のすべての照合順序では 0 が返されます。All other collations return 0. 基本データ型: tinyintBase data type: tinyint |
戻り値の型Return types
sql_variantsql_variant
例Examples
SELECT COLLATIONPROPERTY('Traditional_Spanish_CS_AS_KS_WS', 'CodePage');
結果セットは次のようになります。Here is the result set.
1252
Azure Synapse AnalyticsAzure Synapse Analytics および Parallel Data WarehouseParallel Data Warehouseand Parallel Data WarehouseParallel Data Warehouse
SELECT COLLATIONPROPERTY('Traditional_Spanish_CS_AS_KS_WS', 'CodePage')
結果セットは次のようになります。Here is the result set.
1252
関連項目See also
sys.fn_helpcollations (Transact-SQL)sys.fn_helpcollations (Transact-SQL)