데이터 정렬 및 유니코드 지원Collation and Unicode support
적용 대상:Applies to: SQL ServerSQL Server(지원되는 모든 버전)
SQL ServerSQL Server (all supported versions)
Azure SQL DatabaseAzure SQL Database
Azure SQL DatabaseAzure 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 Warehouse
병렬 데이터 웨어하우스Parallel Data Warehouse
SQL ServerSQL Server(지원되는 모든 버전)
SQL ServerSQL Server (all supported versions)
Azure SQL DatabaseAzure SQL Database
Azure SQL DatabaseAzure 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 Warehouse
병렬 데이터 웨어하우스Parallel Data Warehouse
SQL ServerSQL Server 의 데이터 정렬은 데이터에 대한 정렬 규칙과 대/소문자 및 악센트 구분 속성을 제공합니다.Collations in SQL ServerSQL Server provide sorting rules, case, and accent sensitivity properties for your data. char, varchar 등의 문자 데이터 형식과 함께 사용되는 데이터 정렬은 해당 데이터 형식을 나타내는 데 사용할 수 있는 코드 페이지와 해당 문자를 지정합니다.Collations that are used with character data types, such as char and varchar, dictate the code page and corresponding characters that can be represented for that data type.
SQL ServerSQL Server의 새 인스턴스를 설치하든, 데이터베이스 백업을 복원하든, 서버를 클라이언트 데이터베이스에 연결하든 간에 사용하는 데이터의 로캘 요구 사항, 정렬 순서, 대/소문자 및 악센트 구분 여부를 파악하는 것이 중요합니다.Whether you're installing a new instance of SQL ServerSQL Server, restoring a database backup, or connecting server to client databases, it's important to understand the locale requirements, sorting order, and case and accent sensitivity of the data that you're working with. SQL ServerSQL Server 인스턴스에서 사용 가능한 데이터 정렬을 나열하려면 sys.fn_helpcollations(Transact-SQL)를 참조하세요.To list the collations that are available on your instance of SQL ServerSQL Server, see sys.fn_helpcollations (Transact-SQL).
서버, 데이터베이스, 열 또는 식의 데이터 정렬을 선택하면 데이터에 특정 특성이 할당됩니다.When you select a collation for your server, database, column, or expression, you're assigning certain characteristics to your data. 이러한 특성은 여러 데이터베이스 작업의 결과에 영향을 줍니다.These characteristics affect the results of many operations in the database. 예를 들어 ORDER BY
를 사용하여 쿼리를 생성하는 경우, 결과 집합의 정렬 순서는 쿼리의 식 수준에서 COLLATE
절에 지정되거나 데이터베이스에 적용된 데이터 정렬에 따라 달라집니다.For example, when you construct a query by using ORDER BY
, the sort order of your result set might depend on the collation that's applied to the database or dictated in a COLLATE
clause at the expression level of the query.
SQL ServerSQL Server의 데이터 정렬 지원을 최대한 활용하려면 이 항목에 정의된 용어 및 용어와 데이터 특성 간의 관계를 파악해야 합니다.To best use collation support in SQL ServerSQL Server, you should understand the terms that are defined in this topic and how they relate to the characteristics of your data.
데이터 정렬 용어Collation terms
데이터 정렬Collation
데이터 정렬은 데이터 세트의 각 문자를 나타내는 비트 패턴을 지정합니다.A collation specifies the bit patterns that represent each character in a dataset. 또한 데이터 정렬은 데이터를 정렬하고 비교하는 규칙을 결정합니다.Collations also determine the rules that sort and compare data. SQL ServerSQL Server는 여러 다른 데이터 정렬을 갖는 개체를 단일 데이터베이스에 저장하도록 지원합니다.supports storing objects that have different collations in a single database. 비유니코드 열의 경우 데이터 정렬 설정은 데이터에 대한 코드 페이지와 나타낼 수 있는 문자를 지정합니다.For non-Unicode columns, the collation setting specifies the code page for the data and which characters can be represented. 유니코드를 지원하지 않는 열 간에 데이터를 이동하려면 소스 코드 페이지에서 대상 코드 페이지로 데이터를 변환해야 합니다.The data that you move between non-Unicode columns must be converted from the source code page to the destination code page.
데이터 정렬 설정이 각기 다른 데이터베이스의 컨텍스트에서Transact-SQLTransact-SQL 문을 실행하면 그 결과가 달라질 수 있습니다.Transact-SQLTransact-SQL statement results can vary when the statement is run in the context of different databases that have different collation settings. 가능한 경우 조직에서 표준화된 데이터 정렬을 사용합니다.If possible, use a standardized collation for your organization. 그러면 모든 문자나 유니코드 식에서 데이터 정렬을 지정하지 않아도 됩니다.This way, you don't have to specify the collation in every character or Unicode expression. 데이터 정렬 및 코드 페이지 설정이 다른 개체를 사용해야 할 경우 선행 정렬 우선 순위 규칙을 고려하도록 쿼리를 코딩하세요.If you must work with objects that have different collation and code page settings, code your queries to consider the rules of collation precedence. 자세한 내용은 선행 정렬 우선 순위(Transact-SQL)를 참조하세요.For more information, see Collation Precedence (Transact-SQL).
데이터 정렬 관련 옵션에는 대/소문자 구분, 악센트 구분, 일본어 가나 구분, 전자/반자 구분, 변형 선택기 구분이 있습니다.The options associated with a collation are case sensitivity, accent sensitivity, kana sensitivity, width sensitivity, and variation-selector sensitivity. SQL Server 2019 (15.x)SQL Server 2019 (15.x)은(는) UTF-8 인코딩을 위한 추가 옵션을 도입합니다.introduces an additional option for UTF-8 encoding.
데이터 정렬 이름에 추가하여 이러한 옵션을 지정할 수 있습니다.You can specify these options by appending them to the collation name. 예를 들어 Japanese_Bushu_Kakusu_100_CS_AS_KS_WS_UTF8 데이터 정렬은 대/소문자, 악센트, 일본어 가나, 전자/반자를 구분하며 UTF-8로 인코딩됩니다.For example, the collation Japanese_Bushu_Kakusu_100_CS_AS_KS_WS_UTF8 is case-sensitive, accent-sensitive, kana-sensitive, width-sensitive, and UTF-8 encoded. 또 다른 예로 Japanese_Bushu_Kakusu_140_CI_AI_KS_WS_VSS 데이터 정렬은 대/소문자와 악센트를 구분하지 않고 일본어 가나, 전자/반자 및 변형 선택기를 구분하며 유니코드를 지원하지 않는 인코딩을 사용합니다.As another example, the collation Japanese_Bushu_Kakusu_140_CI_AI_KS_WS_VSS is case-insensitive, accent-insensitive, kana-sensitive, width-sensitive, variation-selector-sensitive, and it uses non-Unicode encoding.
다음 표에서는 이러한 여러 옵션과 관련된 동작을 설명합니다.The behavior associated with these various options is described in the following table:
옵션Option | DescriptionDescription |
---|---|
대/소문자 구분(_CS)Case-sensitive (_CS) | 대/소문자를 구분합니다.Distinguishes between uppercase and lowercase letters. 이 옵션을 선택하면 소문자가 대문자보다 먼저 정렬됩니다.If this option is selected, lowercase letters sort ahead of their uppercase versions. 이 옵션을 선택하지 않으면 데이터 정렬에서 대소문자를 구분하지 않습니다.If this option isn't selected, the collation is case-insensitive. 즉, SQL ServerSQL Server는 정렬할 때 대문자와 소문자를 동일한 것으로 간주합니다.That is, SQL ServerSQL Server considers the uppercase and lowercase versions of letters to be identical for sorting purposes. _CI를 지정하여 대/소문자를 구분하지 않도록 명시적으로 선택할 수 있습니다.You can explicitly select case insensitivity by specifying _CI. |
악센트 구분(_AS)Accent-sensitive (_AS) | 악센트가 있는 문자와 악센트가 없는 문자를 구분합니다.Distinguishes between accented and unaccented characters. 예를 들어 “a”와 “ấ”는 같지 않습니다.For example, "a" is not equal to "ấ". 이 옵션을 선택하지 않으면 데이터 정렬에서 악센트를 구분하지 않습니다.If this option isn't selected, the collation is accent-insensitive. 즉, SQL ServerSQL Server는 정렬할 때 악센트가 있는 문자와 악센트가 없는 문자가 동일한 것으로 간주합니다.That is, SQL ServerSQL Server considers the accented and unaccented versions of letters to be identical for sorting purposes. _AI를 지정하여 악센트를 구분하지 않도록 명시적으로 선택할 수 있습니다.You can explicitly select accent insensitivity by specifying _AI. |
일본어 가나 구분(_KS)Kana-sensitive (_KS) | 일본어 가나 문자의 다음 두 가지 유형을 구분합니다. 히라가나 및 가타가나.Distinguishes between the two types of Japanese kana characters: Hiragana and Katakana. 이 옵션을 선택하지 않으면 데이터 정렬에서 일본어 가나를 구분하지 않습니다.If this option isn't selected, the collation is kana-insensitive. 즉, SQL ServerSQL Server는 정렬할 때 히라가나 문자와 가타카나 문자를 동일한 것으로 간주합니다.That is, SQL ServerSQL Server considers Hiragana and Katakana characters to be equal for sorting purposes. 일본어 가나를 구분하지 않도록 지정하는 유일한 방법은 이 옵션을 생략하는 것입니다.Omitting this option is the only method of specifying kana-insensitivity. |
전자/반자 구분(_WS)Width-sensitive (_WS) | 전자와 반자 문자를 구분합니다.Distinguishes between full-width and half-width characters. 이 옵션을 선택하지 않으면 SQL ServerSQL Server에서 정렬할 때 같은 문자의 전자 표시와 반자 표시를 동일한 문자로 간주합니다.If this option isn't selected, SQL ServerSQL Server considers the full-width and half-width representation of the same character to be identical for sorting purposes. 전자/반자를 구분하지 않도록 지정하는 유일한 방법은 이 옵션을 생략하는 것입니다.Omitting this option is the only method of specifying width-insensitivity. |
변형 선택기 구분(_VSS)Variation-selector-sensitive (_VSS) | SQL Server 2017(14.x)SQL Server 2017 (14.x)에서 도입된 일본어 데이터 정렬 Japanese_Bushu_Kakusu_140 및 Japanese_XJIS_140 의 다양한 표의 문자 변형 선택기를 구분합니다.Distinguishes between various ideographic variation selectors in the Japanese collations Japanese_Bushu_Kakusu_140 and Japanese_XJIS_140, which are introduced in SQL Server 2017(14.x)SQL Server 2017 (14.x). 변형 시퀀스는 기본 문자와 추가 변형 선택기로 구성됩니다.A variation sequence consists of a base character plus an additional variation selector. 이 _VSS 옵션을 선택하지 않으면 데이터 정렬이 변형 선택기를 구분하지 않고 비교 시 변형 선택기가 고려되지 않습니다.If this _VSS option isn't selected, the collation is variation-selector-insensitive, and the variation selector isn't considered in the comparison. 즉, SQL ServerSQL Server에서는 정렬할 때 서로 다른 변형 선택기를 사용하여 동일한 기본 문자를 바탕으로 작성된 문자를 동일한 문자로 간주합니다.That is, SQL ServerSQL Server considers characters built upon the same base character with differing variation selectors to be identical for sorting purposes. 자세한 내용은 Unicode Ideographic Variation Database(유니코드 표의 문자 변형 데이터베이스)를 참조하세요.For more information, see Unicode Ideographic Variation Database. 변형 선택기 구분(_VSS) 데이터 정렬은 전체 텍스트 검색 인덱스에서 지원되지 않습니다.Variation-selector-sensitive (_VSS) collations aren't supported in full-text search indexes. 전체 텍스트 검색 인덱스는 악센트 구분(_AS), 일본어 가나 구분(_KS) 및 전자/반자 구분(_WS) 옵션만 지원합니다.Full-text search indexes support only Accent-Sensitive (_AS), Kana-sensitive (_KS), and Width-sensitive (_WS) options. SQL ServerSQL Server XML 및 CLR 엔진은 (_VSS) 변형 선택기를 지원하지 않습니다.XML and CLR engines don't support (_VSS) Variation selectors. |
이진(_BIN)1Binary (_BIN)1 | 각 문자에 대해 정의된 비트 패턴을 사용하여 SQL ServerSQL Server 테이블의 데이터를 정렬하고 비교합니다.Sorts and compares data in SQL ServerSQL Server tables based on the bit patterns defined for each character. 이진 정렬 순서는 대/소문자와 악센트를 구분합니다.Binary sort order is case-sensitive and accent-sensitive. 이진은 가장 빠른 정렬 순서입니다.Binary is also the fastest sorting order. 자세한 내용은 이 문서에서 이진 데이터 정렬 섹션을 참조하세요.For more information, see the Binary collations section in this article. |
이진 코드 포인트(_BIN2) 1Binary-code point (_BIN2)1 | 유니코드 데이터에 대한 유니코드 코드 포인트를 사용하여 SQL ServerSQL Server 테이블의 데이터를 정렬하고 비교합니다.Sorts and compares data in SQL ServerSQL Server tables based on Unicode code points for Unicode data. 유니코드를 지원하지 않는 데이터의 경우 이진 코드 포인트에서 이진 정렬 비교와 동일한 비교를 사용합니다.For non-Unicode data, Binary-code point uses comparisons that are identical to those for binary sorts. 이진 코드 포인트 정렬 순서 사용 시의 이점은 정렬된 SQL ServerSQL Server 데이터를 비교하는 애플리케이션에서 데이터를 재정렬할 필요가 없다는 점입니다.The advantage of using a Binary-code point sort order is that no data resorting is required in applications that compare sorted SQL ServerSQL Server data. 결과적으로 이진 코드 포인트 정렬 순서를 사용하면 애플리케이션을 더 간단하게 개발할 수 있으며 성능이 향상될 수 있습니다.As a result, a Binary-code point sort order provides simpler application development and possible performance increases. 자세한 내용은 이 문서에서 이진 데이터 정렬 섹션을 참조하세요.For more information, see the Binary collations section in this article. |
UTF-8(_UTF8)UTF-8 (_UTF8) | UTF-8 인코딩 데이터를 SQL ServerSQL Server에 저장할 수 있습니다.Enables UTF-8 encoded data to be stored in SQL ServerSQL Server. 이 옵션을 선택하지 않으면 SQL ServerSQL Server는 해당 데이터 형식에 유니코드를 지원하지 않는 기본 인코딩 형식을 사용합니다.If this option isn't selected, SQL ServerSQL Server uses the default non-Unicode encoding format for the applicable data types. 자세한 내용은 이 문서에서 UTF-8 지원 섹션을 참조하세요.For more information, see the UTF-8 Support section in this article. |
1 BIN 또는 이진 코드 포인트를 선택하면 대/소문자 구분(_CS), 악센트 구분(_AS), 일본어 가나 구분(_KS) 및 전자/반자 구분(_WS) 옵션을 사용할 수 없습니다.1 If Binary or Binary-code point is selected, the Case-sensitive (_CS), Accent-sensitive (_AS), Kana-sensitive (_KS), and Width-sensitive (_WS) options are not available.
데이터 정렬 옵션의 예Examples of collation options
각 데이터 정렬은 일련의 접미사로 결합되어 대/소문자, 악센트, 일본어 가나, 전자/반자 구분 여부를 정의합니다.Each collation is combined as a series of suffixes to define case-, accent-, width-, or kana-sensitivity. 다음 예에서는 다양한 접미사 조합에 대한 정렬 순서 동작에 대해 설명합니다.The following examples describe sort order behavior for various combinations of suffixes.
Windows 데이터 정렬 접미사Windows collation suffix | 정렬 순서 설명Sort order description |
---|---|
_BIN1_BIN1 | 이진 정렬Binary sort |
_BIN21, 2_BIN21, 2 | 이진 코드 포인트 정렬 순서Binary-code point sort order |
_CI_AI2_CI_AI2 | 대/소문자 구분 안 함, 악센트 구분 안 함, 일본어 가나 구분 안 함, 전자/반자 구분 안 함Case-insensitive, accent-insensitive, kana-insensitive, width-insensitive |
_CI_AI_KS2_CI_AI_KS2 | 대/소문자 구분 안 함, 악센트 구분 안 함, 일본어 가나 구분, 전자/반자 구분 안 함Case-insensitive, accent-insensitive, kana-sensitive, width-insensitive |
_CI_AI_KS_WS2_CI_AI_KS_WS2 | 대/소문자 구분 안 함, 악센트 구분 안 함, 일본어 가나 구분, 전자/반자 구분Case-insensitive, accent-insensitive, kana-sensitive, width-sensitive |
_CI_AI_WS2_CI_AI_WS2 | 대/소문자 구분 안 함, 악센트 구분 안 함, 일본어 가나 구분 안 함, 전자/반자 구분Case-insensitive, accent-insensitive, kana-insensitive, width-sensitive |
_CI_AS2_CI_AS2 | 대/소문자 구분 안 함, 악센트 구분, 일본어 가나 구분 안 함, 전자/반자 구분 안 함Case-insensitive, accent-sensitive, kana-insensitive, width-insensitive |
_CI_AS_KS2_CI_AS_KS2 | 대/소문자 구분 안 함, 악센트 구분, 일본어 가나 구분, 전자/반자 구분 안 함Case-insensitive, accent-sensitive, kana-sensitive, width-insensitive |
_CI_AS_KS_WS2_CI_AS_KS_WS2 | 대/소문자 구분 안 함, 악센트 구분, 일본어 가나 구분, 전자/반자 구분Case-insensitive, accent-sensitive, kana-sensitive, width-sensitive |
_CI_AS_WS2_CI_AS_WS2 | 대/소문자 구분 안 함, 악센트 구분, 일본어 가나 구분 안 함, 전자/반자 구분Case-insensitive, accent-sensitive, kana-insensitive, width-sensitive |
_CS_AI2_CS_AI2 | 대/소문자 구분, 악센트 구분 안 함, 일본어 가나 구분 안 함, 전자/반자 구분 안 함Case-sensitive, accent-insensitive, kana-insensitive, width-insensitive |
_CS_AI_KS2_CS_AI_KS2 | 대/소문자 구분, 악센트 구분 안 함, 일본어 가나 구분, 전자/반자 구분 안 함Case-sensitive, accent-insensitive, kana-sensitive, width-insensitive |
_CS_AI_KS_WS2_CS_AI_KS_WS2 | 대/소문자 구분, 악센트 구분 안 함, 일본어 가나 구분, 전자/반자 구분Case-sensitive, accent-insensitive, kana-sensitive, width-sensitive |
_CS_AI_WS2_CS_AI_WS2 | 대/소문자 구분, 악센트 구분 안 함, 일본어 가나 구분 안 함, 전자/반자 구분Case-sensitive, accent-insensitive, kana-insensitive, width-sensitive |
_CS_AS2_CS_AS2 | 대/소문자 구분, 악센트 구분, 일본어 가나 구분 안 함, 전자/반자 구분 안 함Case-sensitive, accent-sensitive, kana-insensitive, width-insensitive |
_CS_AS_KS2_CS_AS_KS2 | 대/소문자 구분, 악센트 구분, 일본어 가나 구분, 전자/반자 구분 안 함Case-sensitive, accent-sensitive, kana-sensitive, width-insensitive |
_CS_AS_KS_WS2_CS_AS_KS_WS2 | 대/소문자 구분, 악센트 구분, 일본어 가나 구분, 전자/반자 구분Case-sensitive, accent-sensitive, kana-sensitive, width-sensitive |
_CS_AS_WS2_CS_AS_WS2 | 대/소문자 구분, 악센트 구분, 일본어 가나 구분 안 함, 전자/반자 구분Case-sensitive, accent-sensitive, kana-insensitive, width-sensitive |
1 이진 또는 이진 코드 포인트를 선택하면 대/소문자 구분(_CS), 악센트 구분(_AS), 일본어 가나 구분(_KS) 및 전자/반자 구분(_WS) 옵션을 사용할 수 없습니다.1 If Binary or Binary-code point is selected, the Case-sensitive (_CS), Accent-sensitive (_AS), Kana-sensitive (_KS), and Width-sensitive (_WS) options aren't available.
2 UTF-8 옵션(_UTF8)을 추가하면 UTF-8을 사용하여 유니코드 데이터를 인코딩할 수 있습니다.2 Adding the UTF-8 option (_UTF8) enables you to encode Unicode data by using UTF-8. 자세한 내용은 이 문서에서 UTF-8 지원 섹션을 참조하세요.For more information, see the UTF-8 Support section in this article.
데이터 정렬 집합Collation sets
SQL ServerSQL Server 에서 지원하는 데이터 정렬 집합은 다음과 같습니다.supports the following collation sets:
Windows 데이터 정렬Windows collations
Windows 데이터 정렬은 관련 Windows 시스템 로캘을 기반으로 하는 문자 데이터 저장 규칙을 정의합니다.Windows collations define rules for storing character data that's based on an associated Windows system locale. Windows 데이터 정렬의 경우 유니코드 데이터 비교와 동일한 알고리즘을 사용하여 유니코드를 지원하지 않는 데이터 비교를 구현할 수 있습니다.For a Windows collation, you can implement a comparison of non-Unicode data by using the same algorithm as that for Unicode data. 기본 Windows 데이터 정렬 규칙은 사전 정렬을 적용할 때 사용되는 알파벳이나 언어를 지정하며,The base Windows collation rules specify which alphabet or language is used when dictionary sorting is applied. 유니코드를 지원하지 않는 문자 데이터를 저장하는 데 사용되는 코드 페이지도 지정합니다.The rules also specify the code page that's used to store non-Unicode character data. 유니코드 정렬과 비유니코드 정렬은 모두 특정 버전의 Windows에서 수행되는 문자열 비교와 호환됩니다.Both Unicode and non-Unicode sorting are compatible with string comparisons in a particular version of Windows. 따라서 SQL ServerSQL Server 내의 데이터 형식에서 일관성이 유지되고, 개발자는 애플리케이션에서 SQL ServerSQL Server에 사용되는 것과 동일한 규칙을 사용하여 문자열을 정렬할 수 있습니다.This provides consistency across data types within SQL ServerSQL Server, and it lets developers sort strings in their applications by using the same rules that are used by SQL ServerSQL Server. 자세한 내용은 Windows 데이터 정렬 이름(Transact-SQL)을 참조하세요.For more information, see Windows Collation Name (Transact-SQL).
이진 데이터 정렬Binary collations
이진 데이터 정렬은 로캘 및 데이터 형식으로 정의된 코딩 값 시퀀스에 따라 데이터를 정렬합니다.Binary collations sort data based on the sequence of coded values that are defined by the locale and data type. 대/소문자를 구분합니다.They're case-sensitive. SQL ServerSQL Server의 이진 데이터 정렬은 사용되는 로캘과 ANSI 코드 페이지를 정의하며A binary collation in SQL ServerSQL Server defines the locale and the ANSI code page that's used. 이진 정렬 순서를 적용합니다.This enforces a binary sort order. 이진 데이터 정렬은 비교적 간단하므로 애플리케이션 성능을 향상하는 데 도움이 됩니다.Because they're relatively simple, binary collations help improve application performance. 유니코드를 지원하지 않는 데이터 형식의 경우 데이터 비교는 ANSI 코드 페이지에 정의된 코드 포인트를 기준으로 수행됩니다.For non-Unicode data types, data comparisons are based on the code points that are defined on the ANSI code page. 유니코드 데이터 형식의 경우 데이터 비교는 유니코드 코드 포인트를 기준으로 수행됩니다.For Unicode data types, data comparisons are based on the Unicode code points. 유니코드 데이터 형식에 대한 이진 데이터 정렬의 경우 데이터 정렬 시 로캘이 고려되지 않습니다.For binary collations on Unicode data types, the locale isn't considered in data sorts. 예를 들어 Latin_1_General_BIN 및 Japanese_BIN 은 유니코드 데이터에서 사용할 때 동일한 정렬 결과를 생성합니다.For example, Latin_1_General_BIN and Japanese_BIN yield identical sorting results when they're used on Unicode data. 자세한 내용은 Windows 데이터 정렬 이름(Transact-SQL)을 참조하세요.For more information, see Windows Collation Name (Transact-SQL).
SQL ServerSQL Server에는 두 가지 이진 데이터 정렬 유형이 있습니다.There are two types of binary collations in SQL ServerSQL Server:
유니코드 데이터에 대해 불완전한 코드 포인트 간 비교를 수행한 레거시 BIN 데이터 정렬.The legacy BIN collations, which performed an incomplete code-point-to-code-point comparison for Unicode data. 이 레거시 이진 데이터 정렬은 WCHAR로 첫 번째 문자를 비교한 후 바이트 단위 비교를 수행했습니다.These legacy binary collations compared the first character as WCHAR, followed by a byte-by-byte comparison. BIN 데이터 정렬에서 첫 번째 문자만 코드 포인트에 따라 정렬되고 나머지 문자는 바이트 값에 따라 정렬됩니다.In a BIN collation, only the first character is sorted according to the code point, and remaining characters are sorted according to their byte values.
순수형 코드 포인트 비교를 구현하는 최신 BIN2 데이터 정렬.The newer BIN2 collations, which implement a pure code-point comparison. BIN2 데이터 정렬에서는 모든 문자가 코드 포인트에 따라 정렬됩니다.In a BIN2 collation, all characters are sorted according to their code points. Intel 플랫폼은 little endian 아키텍처이므로, 유니코드 문자는 항상 바이트 스왑 상태로 저장됩니다.Because the Intel platform is a little endian architecture, Unicode code characters are always stored byte-swapped.
SQL Server 데이터 정렬SQL Server collations
SQL ServerSQL Server 데이터 정렬(SQL_*)은 이전 버전의 SQL ServerSQL Server와 정렬 순서가 호환됩니다.collations (SQL_*) provide sort order compatibility with earlier versions of SQL ServerSQL Server. 유니코드를 지원하지 않는 데이터에 대한 사전 정렬 규칙은 Windows 운영 체제에서 제공하는 정렬 루틴과 호환되지 않지만,The dictionary sorting rules for non-Unicode data are incompatible with any sorting routine that's provided by Windows operating systems. 유니코드 데이터의 정렬은 특정 버전의 Windows 정렬 규칙과 호환됩니다.However, sorting Unicode data is compatible with a particular version of Windows sorting rules. SQL ServerSQL Server 데이터 정렬은 비유니코드 데이터와 유니코드 데이터에 대해 다른 비교 규칙을 사용하므로 기본 데이터 형식에 따라 동일한 데이터에 대한 비교 결과가 달라집니다.Because SQL ServerSQL Server collations use different comparison rules for non-Unicode and Unicode data, you see different results for comparisons of the same data, depending on the underlying data type. 자세한 내용은 SQL Server 데이터 정렬 이름(Transact-SQL)을 참조하세요.For more information, see SQL Server Collation Name (Transact-SQL).
SQL ServerSQL Server를 설치하는 동안 기본 설치 데이터 정렬 설정은 OS(운영 체제) 로캘에 의해 결정됩니다.During SQL ServerSQL Server setup, the default installation collation setting is determined by the operating system (OS) locale. 설치 전에 OS 로캘을 변경하거나 설치 중에 변경하여 서버 수준 데이터 정렬을 변경할 수 있습니다.You can change the server-level collation either during setup or by changing the OS locale before installation. 이전 버전과의 호환성을 위해 기본 데이터 정렬은 각 특정 로캘에서 사용 가능한 가장 오래된 버전으로 설정됩니다.For backward compatibility reasons, the default collation is set to the oldest available version that's associated with each specific locale. 따라서 권장되는 데이터 정렬이 아닐 수도 있습니다.Therefore, this isn't always the recommended collation. SQL ServerSQL Server 기능을 활용하려면 Windows 데이터 정렬을 사용하기 위한 기본 설치 설정을 변경하세요.To take full advantage of SQL ServerSQL Server features, change the default installation settings to use Windows collations. 예를 들어 OS 로캘 “영어(미국)”(코드 페이지 1252)의 경우 설치 중의 기본 데이터 정렬은 SQL_Latin1_General_CP1_CI_AS 이고 가장 가까운 Windows 데이터 정렬인 Latin1_General_100_CI_AS_SC 로 변경될 수 있습니다.For example, for the OS locale "English (United States)" (code page 1252), the default collation during setup is SQL_Latin1_General_CP1_CI_AS, and it can be changed to its closest Windows collation counterpart, Latin1_General_100_CI_AS_SC.
참고
SQL ServerSQL Server의 영어 인스턴스를 업그레이드하는 경우, 기존 SQL ServerSQL Server 인스턴스와의 호환성을 위해 SQL ServerSQL Server 데이터 정렬(SQL_*)을 지정할 수 있습니다.When you upgrade an English-language instance of SQL ServerSQL Server, you can specify SQL ServerSQL Server collations (SQL_*) for compatibility with existing instances of SQL ServerSQL Server. SQL ServerSQL Server 인스턴스의 기본 데이터 정렬은 설치 중에 정의되므로 다음 조건에 해당하는 경우 데이터 정렬 설정을 신중하게 지정해야 합니다.Because the default collation for an instance of SQL ServerSQL Server is defined during setup, make sure that you specify the collation settings carefully when the following conditions are true:
- 애플리케이션 코드가 이전 SQL ServerSQL Server 데이터 정렬의 동작에 의존할 경우Your application code depends on the behavior of previous SQL ServerSQL Server collations.
- 여러 언어를 반영하는 문자 데이터를 저장해야 하는 경우You must store character data that reflects multiple languages.
데이터 정렬 수준Collation levels
다음 수준의 SQL ServerSQL Server인스턴스에서 데이터 정렬을 설정할 수 있습니다.Setting collations are supported at the following levels of an instance of SQL ServerSQL Server:
- 서버 수준 데이터 정렬Server-level collations
- 데이터베이스 수준 데이터 정렬Database-level collations
- 열 수준 데이터 정렬Column-level collations
- 식 수준 데이터 정렬Expression-level collations
서버 수준 데이터 정렬Server-level collations
기본 서버 데이터 정렬은 SQL ServerSQL Server 설치 중에 결정되며, 시스템 데이터베이스 및 모든 사용자 데이터베이스의 기본 데이터 정렬이 됩니다.The default server collation is determined during SQL ServerSQL Server setup, and it becomes the default collation of the system databases and all user databases.
다음 표에서는 각각의 Windows 및 SQL LCID(언어 코드 식별자)를 포함하여 OS(운영 체제) 로캘에 따라 결정되는 기본 데이터 정렬 지정을 보여 줍니다.The following table shows the default collation designations, as determined by the operating system (OS) locale, including their Windows and SQL Language Code Identifiers (LCID):
Windows 로캘Windows locale | Windows LCIDWindows LCID | SQL LCIDSQL LCID | 기본 데이터 정렬Default collation |
---|---|---|---|
아프리칸스어(남아프리카 공화국)Afrikaans (South Africa) | 0x04360x0436 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
알바니아어(알바니아)Albanian (Albania) | 0x041c0x041c | 0x041c0x041c | Albanian_CI_ASAlbanian_CI_AS |
알자스어(프랑스)Alsatian (France) | 0x04840x0484 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
암하라어(에티오피아)Amharic (Ethiopia) | 0x045e0x045e | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
아랍어(알제리아)Arabic (Algeria) | 0x14010x1401 | 0x04010x0401 | Arabic_CI_ASArabic_CI_AS |
Arabic (Bahrain)Arabic (Bahrain) | 0x3c010x3c01 | 0x04010x0401 | Arabic_CI_ASArabic_CI_AS |
아랍어(이집트)Arabic (Egypt) | 0x0c010x0c01 | 0x04010x0401 | Arabic_CI_ASArabic_CI_AS |
아랍어(이라크)Arabic (Iraq) | 0x08010x0801 | 0x04010x0401 | Arabic_CI_ASArabic_CI_AS |
아랍어(요르단)Arabic (Jordan) | 0x2c010x2c01 | 0x04010x0401 | Arabic_CI_ASArabic_CI_AS |
아랍어(쿠웨이트)Arabic (Kuwait) | 0x34010x3401 | 0x04010x0401 | Arabic_CI_ASArabic_CI_AS |
아랍어(레바논)Arabic (Lebanon) | 0x30010x3001 | 0x04010x0401 | Arabic_CI_ASArabic_CI_AS |
아랍어(리비아)Arabic (Libya) | 0x10010x1001 | 0x04010x0401 | Arabic_CI_ASArabic_CI_AS |
아랍어(모로코)Arabic (Morocco) | 0x18010x1801 | 0x04010x0401 | Arabic_CI_ASArabic_CI_AS |
아랍어(오만)Arabic (Oman) | 0x20010x2001 | 0x04010x0401 | Arabic_CI_ASArabic_CI_AS |
아랍어(카타르)Arabic (Qatar) | 0x40010x4001 | 0x04010x0401 | Arabic_CI_ASArabic_CI_AS |
아랍어(사우디아라비아)Arabic (Saudi Arabia) | 0x04010x0401 | 0x04010x0401 | Arabic_CI_ASArabic_CI_AS |
아랍어(시리아)Arabic (Syria) | 0x28010x2801 | 0x04010x0401 | Arabic_CI_ASArabic_CI_AS |
아랍어(튀니지)Arabic (Tunisia) | 0x1c010x1c01 | 0x04010x0401 | Arabic_CI_ASArabic_CI_AS |
아랍어(아랍에미리트)Arabic (U.A.E.) | 0x38010x3801 | 0x04010x0401 | Arabic_CI_ASArabic_CI_AS |
아랍어(예멘)Arabic (Yemen) | 0x24010x2401 | 0x04010x0401 | Arabic_CI_ASArabic_CI_AS |
아르메니아어(아르메니아)Armenian (Armenia) | 0x042b0x042b | 0x04190x0419 | Latin1_General_CI_ASLatin1_General_CI_AS |
아삼어(인도)Assamese (India) | 0x044d0x044d | 0x044d0x044d | 서버 수준에서 사용할 수 없음Not available at server level |
아제르바이잔어(아제르바이잔, 키릴 자모)Azerbaijani (Azerbaijan, Cyrillic) | 0x082c0x082c | 0x082c0x082c | 더 이상 사용되지 않으며 서버 수준에서 사용할 수 없음Deprecated, not available at server level |
아제르바이잔어(아제르바이잔, 라틴 문자)Azerbaijani (Azerbaijan, Latin) | 0x042c0x042c | 0x042c0x042c | 더 이상 사용되지 않으며 서버 수준에서 사용할 수 없음Deprecated, not available at server level |
바슈키르어(러시아)Bashkir (Russia) | 0x046d0x046d | 0x046d0x046d | Latin1_General_CI_AILatin1_General_CI_AI |
바스크어(바스크)Basque (Basque) | 0x042d0x042d | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
벨로루시어(벨로루시)Belarusian (Belarus) | 0x04230x0423 | 0x04190x0419 | Cyrillic_General_CI_ASCyrillic_General_CI_AS |
벵골어(방글라데시)Bangla (Bangladesh) | 0x08450x0845 | 0x04450x0445 | 서버 수준에서 사용할 수 없음Not available at server level |
벵골어(인도)Bengali (India) | 0x04450x0445 | 0x04390x0439 | 서버 수준에서 사용할 수 없음Not available at server level |
보스니아어(보스니아 헤르체고비나, 키릴 자모)Bosnian (Bosnia and Herzegovina, Cyrillic) | 0x201a0x201a | 0x201a0x201a | Latin1_General_CI_AILatin1_General_CI_AI |
보스니아어(보스니아 헤르체고비나, 라틴 문자)Bosnian (Bosnia and Herzegovina, Latin) | 0x141a0x141a | 0x141a0x141a | Latin1_General_CI_AILatin1_General_CI_AI |
브르타뉴어(프랑스)Breton (France) | 0x047e0x047e | 0x047e0x047e | Latin1_General_CI_AILatin1_General_CI_AI |
불가리아어(불가리아)Bulgarian (Bulgaria) | 0x04020x0402 | 0x04190x0419 | Cyrillic_General_CI_ASCyrillic_General_CI_AS |
카탈로니아어(카탈로니아)Catalan (Catalan) | 0x04030x0403 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
중국어(홍콩 특별 행정구, 중국)Chinese (Hong Kong SAR, PRC) | 0x0c040x0c04 | 0x04040x0404 | Chinese_Taiwan_Stroke_CI_ASChinese_Taiwan_Stroke_CI_AS |
중국어(마카오 특별 행정구)Chinese (Macao SAR) | 0x14040x1404 | 0x14040x1404 | Latin1_General_CI_AILatin1_General_CI_AI |
중국어(마카오)Chinese (Macau) | 0x214040x21404 | 0x214040x21404 | Latin1_General_CI_AILatin1_General_CI_AI |
중국어(중국)Chinese (PRC) | 0x08040x0804 | 0x08040x0804 | Chinese_PRC_CI_ASChinese_PRC_CI_AS |
중국어(중국)Chinese (PRC) | 0x208040x20804 | 0x208040x20804 | Chinese_PRC_Stroke_CI_ASChinese_PRC_Stroke_CI_AS |
중국어(싱가포르)Chinese (Singapore) | 0x10040x1004 | 0x08040x0804 | Chinese_PRC_CI_ASChinese_PRC_CI_AS |
중국어(싱가포르)Chinese (Singapore) | 0x210040x21004 | 0x208040x20804 | Chinese_PRC_Stroke_CI_ASChinese_PRC_Stroke_CI_AS |
중국어(대만)Chinese (Taiwan) | 0x304040x30404 | 0x304040x30404 | Chinese_Taiwan_Bopomofo_CI_ASChinese_Taiwan_Bopomofo_CI_AS |
중국어(대만)Chinese (Taiwan) | 0x04040x0404 | 0x04040x0404 | Chinese_Taiwan_Stroke_CI_ASChinese_Taiwan_Stroke_CI_AS |
코르시카어(프랑스)Corsican (France) | 0x04830x0483 | 0x04830x0483 | Latin1_General_CI_AILatin1_General_CI_AI |
크로아티아어(보스니아 헤르체고비나, 라틴 문자)Croatian (Bosnia and Herzegovina, Latin) | 0x101a0x101a | 0x041a0x041a | Croatian_CI_ASCroatian_CI_AS |
크로아티아어(크로아티아)Croatian (Croatia) | 0x041a0x041a | 0x041a0x041a | Croatian_CI_ASCroatian_CI_AS |
체코어(체코)Czech (Czech Republic) | 0x04050x0405 | 0x04050x0405 | Czech_CI_ASCzech_CI_AS |
덴마크어(덴마크)Danish (Denmark) | 0x04060x0406 | 0x04060x0406 | Danish_Norwegian_CI_ASDanish_Norwegian_CI_AS |
다리어(아프가니스탄)Dari (Afghanistan) | 0x048c0x048c | 0x048c0x048c | Latin1_General_CI_AILatin1_General_CI_AI |
디베히어(몰디브)Divehi (Maldives) | 0x04650x0465 | 0x04650x0465 | 서버 수준에서 사용할 수 없음Not available at server level |
네덜란드어(벨기에)Dutch (Belgium) | 0x08130x0813 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
네덜란드어(네덜란드)Dutch (Netherlands) | 0x04130x0413 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
영어(오스트레일리아)English (Australia) | 0x0c090x0c09 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
영어(벨리즈)English (Belize) | 0x28090x2809 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
영어(캐나다)English (Canada) | 0x10090x1009 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
영어(카리브 해)English (Caribbean) | 0x24090x2409 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
영어(인도)English (India) | 0x40090x4009 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
영어(아일랜드)English (Ireland) | 0x18090x1809 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
영어(자메이카)English (Jamaica) | 0x20090x2009 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
영어(말레이시아)English (Malaysia) | 0x44090x4409 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
영어(뉴질랜드)English (New Zealand) | 0x14090x1409 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
영어(필리핀)English (Philippines) | 0x34090x3409 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
영어(싱가포르)English (Singapore) | 0x48090x4809 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
영어(남아프리카)English (South Africa) | 0x1c090x1c09 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
영어(트리니다드 토바고)English (Trinidad and Tobago) | 0x2c090x2c09 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
영어(영국)English (United Kingdom) | 0x08090x0809 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
영어(미국)English (United States) | 0x04090x0409 | 0x04090x0409 | SQL_Latin1_General_CP1_CI_ASSQL_Latin1_General_CP1_CI_AS |
영어(짐바브웨)English (Zimbabwe) | 0x30090x3009 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
에스토니아어(에스토니아)Estonian (Estonia) | 0x04250x0425 | 0x04250x0425 | Estonian_CI_ASEstonian_CI_AS |
페로어(페로 제도)Faroese (Faroe Islands) | 0x04380x0438 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
필리핀어(필리핀)Filipino (Philippines) | 0x04640x0464 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
핀란드어(핀란드)Finnish (Finland) | 0x040b0x040b | 0x040b0x040b | Finnish_Swedish_CI_ASFinnish_Swedish_CI_AS |
프랑스어(벨기에)French (Belgium) | 0x080c0x080c | 0x040c0x040c | French_CI_ASFrench_CI_AS |
프랑스어(캐나다)French (Canada) | 0x0c0c0x0c0c | 0x040c0x040c | French_CI_ASFrench_CI_AS |
프랑스어(프랑스)French (France) | 0x040c0x040c | 0x040c0x040c | French_CI_ASFrench_CI_AS |
프랑스어(룩셈부르크)French (Luxembourg) | 0x140c0x140c | 0x040c0x040c | French_CI_ASFrench_CI_AS |
프랑스어(모나코)French (Monaco) | 0x180c0x180c | 0x040c0x040c | French_CI_ASFrench_CI_AS |
프랑스어(스위스)French (Switzerland) | 0x100c0x100c | 0x040c0x040c | French_CI_ASFrench_CI_AS |
프리지아어(네덜란드)Frisian (Netherlands) | 0x04620x0462 | 0x04620x0462 | Latin1_General_CI_AILatin1_General_CI_AI |
갈리시아어Galician | 0x04560x0456 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
조지아어(조지아)Georgian (Georgia) | 0x104370x10437 | 0x104370x10437 | Georgian_Modern_Sort_CI_ASGeorgian_Modern_Sort_CI_AS |
조지아어(조지아)Georgian (Georgia) | 0x04370x0437 | 0x04190x0419 | Latin1_General_CI_ASLatin1_General_CI_AS |
독일어 - 전화 번호부 정렬(DIN)German - Phone Book Sort (DIN) | 0x104070x10407 | 0x104070x10407 | German_PhoneBook_CI_ASGerman_PhoneBook_CI_AS |
독일어(오스트리아)German (Austria) | 0x0c070x0c07 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
독일어(독일)German (Germany) | 0x04070x0407 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
독일어(리히텐슈타인)German (Liechtenstein) | 0x14070x1407 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
독일어(룩셈부르크)German (Luxembourg) | 0x10070x1007 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
독일어(스위스)German (Switzerland) | 0x08070x0807 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
그리스어(그리스)Greek (Greece) | 0x04080x0408 | 0x04080x0408 | Greek_CI_ASGreek_CI_AS |
그린란드어(그린란드)Greenlandic (Greenland) | 0x046f0x046f | 0x04060x0406 | Danish_Norwegian_CI_ASDanish_Norwegian_CI_AS |
구자라트어(인도)Gujarati (India) | 0x04470x0447 | 0x04390x0439 | 서버 수준에서 사용할 수 없음Not available at server level |
하우사어(나이지리아, 라틴 문자)Hausa (Nigeria, Latin) | 0x04680x0468 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
히브리어(이스라엘)Hebrew (Israel) | 0x040d0x040d | 0x040d0x040d | Hebrew_CI_ASHebrew_CI_AS |
힌디어(인도)Hindi (India) | 0x04390x0439 | 0x04390x0439 | 서버 수준에서 사용할 수 없음Not available at server level |
헝가리어(헝가리)Hungarian (Hungary) | 0x040e0x040e | 0x040e0x040e | Hungarian_CI_ASHungarian_CI_AS |
헝가리어의 기술적인 정렬Hungarian Technical Sort | 0x1040e0x1040e | 0x1040e0x1040e | Hungarian_Technical_CI_ASHungarian_Technical_CI_AS |
아이슬란드어(아이슬란드)Icelandic (Iceland) | 0x040f0x040f | 0x040f0x040f | Icelandic_CI_ASIcelandic_CI_AS |
이그보어(나이지리아)Igbo (Nigeria) | 0x04700x0470 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
인도네시아어(인도네시아)Indonesian (Indonesia) | 0x04210x0421 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
이눅티투트어(캐나다, 라틴 문자)Inuktitut (Canada, Latin) | 0x085d0x085d | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
이눅티투트어(캐나다 음절)Inuktitut (Syllabics) Canada | 0x045d0x045d | 0x045d0x045d | Latin1_General_CI_AILatin1_General_CI_AI |
아일랜드어(아일랜드)Irish (Ireland) | 0x083c0x083c | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
이탈리아어(이탈리아)Italian (Italy) | 0x04100x0410 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
이탈리아어(스위스)Italian (Switzerland) | 0x08100x0810 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
일본어(일본 XJIS)Japanese (Japan XJIS) | 0x04110x0411 | 0x04110x0411 | Japanese_CI_ASJapanese_CI_AS |
일본어(일본)Japanese (Japan) | 0x0404110x040411 | 0x404110x40411 | Latin1_General_CI_AILatin1_General_CI_AI |
칸나다어(인도)Kannada (India) | 0x044b0x044b | 0x04390x0439 | 서버 수준에서 사용할 수 없음Not available at server level |
카자흐어(카자흐스탄)Kazakh (Kazakhstan) | 0x043f0x043f | 0x043f0x043f | Kazakh_90_CI_ASKazakh_90_CI_AS |
크메르어(캄보디아)Khmer (Cambodia) | 0x04530x0453 | 0x04530x0453 | 서버 수준에서 사용할 수 없음Not available at server level |
끼체어(과테말라)K'iche (Guatemala) | 0x04860x0486 | 0x0c0a0x0c0a | Modern_Spanish_CI_ASModern_Spanish_CI_AS |
키냐르완다어(르완다)Kinyarwanda (Rwanda) | 0x04870x0487 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
코카니어(인도)Konkani (India) | 0x04570x0457 | 0x04390x0439 | 서버 수준에서 사용할 수 없음Not available at server level |
한국어(한국어 사전 정렬)Korean (Korea Dictionary Sort) | 0x04120x0412 | 0x04120x0412 | Korean_Wansung_CI_ASKorean_Wansung_CI_AS |
키르기스어(키르기스스탄)Kyrgyz (Kyrgyzstan) | 0x04400x0440 | 0x04190x0419 | Cyrillic_General_CI_ASCyrillic_General_CI_AS |
라오어(라오스)Lao (Lao PDR) | 0x04540x0454 | 0x04540x0454 | 서버 수준에서 사용할 수 없음Not available at server level |
라트비아어(라트비아)Latvian (Latvia) | 0x04260x0426 | 0x04260x0426 | Latvian_CI_ASLatvian_CI_AS |
리투아니아어(리투아니아)Lithuanian (Lithuania) | 0x04270x0427 | 0x04270x0427 | Lithuanian_CI_ASLithuanian_CI_AS |
저지 소르비아어(독일)Lower Sorbian (Germany) | 0x082e0x082e | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
룩셈부르크어(룩셈부르크)Luxembourgish (Luxembourg) | 0x046e0x046e | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
마케도니아어(북마케도니아)Macedonian (North Macedonia, FYROM) | 0x042f0x042f | 0x042f0x042f | Macedonian_FYROM_90_CI_ASMacedonian_FYROM_90_CI_AS |
말레이어(브루나이)Malay (Brunei Darussalam) | 0x083e0x083e | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
말레이어(말레이시아)Malay (Malaysia) | 0x043e0x043e | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
말라얄람어(인도)Malayalam (India) | 0x044c0x044c | 0x04390x0439 | 서버 수준에서 사용할 수 없음Not available at server level |
몰타어(몰타)Maltese (Malta) | 0x043a0x043a | 0x043a0x043a | Latin1_General_CI_AILatin1_General_CI_AI |
마오리어(뉴질랜드)Maori (New Zealand) | 0x04810x0481 | 0x04810x0481 | Latin1_General_CI_AILatin1_General_CI_AI |
마푸둥군어(칠레)Mapudungun (Chile) | 0x047a0x047a | 0x047a0x047a | Latin1_General_CI_AILatin1_General_CI_AI |
마라티어(인도)Marathi (India) | 0x044e0x044e | 0x04390x0439 | 서버 수준에서 사용할 수 없음Not available at server level |
모호크어(모호크)Mohawk (Canada) | 0x047c0x047c | 0x047c0x047c | Latin1_General_CI_AILatin1_General_CI_AI |
몽골어(몽골)Mongolian (Mongolia) | 0x04500x0450 | 0x04190x0419 | Cyrillic_General_CI_ASCyrillic_General_CI_AS |
몽골어(중국)Mongolian (PRC) | 0x08500x0850 | 0x04190x0419 | Cyrillic_General_CI_ASCyrillic_General_CI_AS |
네팔어(네팔)Nepali (Nepal) | 0x04610x0461 | 0x04610x0461 | 서버 수준에서 사용할 수 없음Not available at server level |
노르웨이어(복말)(노르웨이)Norwegian (Bokmål, Norway) | 0x04140x0414 | 0x04140x0414 | Latin1_General_CI_AILatin1_General_CI_AI |
노르웨이어(니노르스크)(노르웨이)Norwegian (Nynorsk, Norway) | 0x08140x0814 | 0x04140x0414 | Latin1_General_CI_AILatin1_General_CI_AI |
오크어(프랑스)Occitan (France) | 0x04820x0482 | 0x040c0x040c | French_CI_ASFrench_CI_AS |
오리야어(인도)Odia (India) | 0x04480x0448 | 0x04390x0439 | 서버 수준에서 사용할 수 없음Not available at server level |
파슈토어(아프가니스탄)Pashto (Afghanistan) | 0x04630x0463 | 0x04630x0463 | 서버 수준에서 사용할 수 없음Not available at server level |
페르시아어(이란)Persian (Iran) | 0x04290x0429 | 0x04290x0429 | Latin1_General_CI_AILatin1_General_CI_AI |
폴란드어(폴란드)Polish (Poland) | 0x04150x0415 | 0x04150x0415 | Polish_CI_ASPolish_CI_AS |
포르투갈어(브라질)Portuguese (Brazil) | 0x04160x0416 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
포르투갈어(포르투갈)Portuguese (Portugal) | 0x08160x0816 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
펀잡어(인도)Punjabi (India) | 0x04460x0446 | 0x04390x0439 | 서버 수준에서 사용할 수 없음Not available at server level |
케추아어(볼리비아)Quechua (Bolivia) | 0x046b0x046b | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
케추아어(에콰도르)Quechua (Ecuador) | 0x086b0x086b | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
케추아어(페루)Quechua (Peru) | 0x0c6b0x0c6b | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
루마니아어(루마니아)Romanian (Romania) | 0x04180x0418 | 0x04180x0418 | Romanian_CI_ASRomanian_CI_AS |
로만시어(스위스)Romansh (Switzerland) | 0x04170x0417 | 0x04170x0417 | Latin1_General_CI_AILatin1_General_CI_AI |
러시아어(러시아)Russian (Russia) | 0x04190x0419 | 0x04190x0419 | Cyrillic_General_CI_ASCyrillic_General_CI_AS |
사하어(러시아)Sahka (Russia) | 0x04850x0485 | 0x04850x0485 | Latin1_General_CI_AILatin1_General_CI_AI |
이나리 라프어(핀란드)Sami (Inari, Finland) | 0x243b0x243b | 0x083b0x083b | Latin1_General_CI_AILatin1_General_CI_AI |
룰레 라프어(노르웨이)Sami (Lule, Norway) | 0x103b0x103b | 0x043b0x043b | Latin1_General_CI_AILatin1_General_CI_AI |
룰레 라프어(스웨덴)Sami (Lule, Sweden) | 0x143b0x143b | 0x083b0x083b | Latin1_General_CI_AILatin1_General_CI_AI |
북부 라프어(핀란드)Sami (Northern, Finland) | 0x0c3b0x0c3b | 0x083b0x083b | Latin1_General_CI_AILatin1_General_CI_AI |
북부 라프어(노르웨이)Sami (Northern, Norway) | 0x043b0x043b | 0x043b0x043b | Latin1_General_CI_AILatin1_General_CI_AI |
북부 라프어(스웨덴)Sami (Northern, Sweden) | 0x083b0x083b | 0x083b0x083b | Latin1_General_CI_AILatin1_General_CI_AI |
스콜트 라프어(핀란드)Sami (Skolt, Finland) | 0x203b0x203b | 0x083b0x083b | Latin1_General_CI_AILatin1_General_CI_AI |
남부 라프어(노르웨이)Sami (Southern, Norway) | 0x183b0x183b | 0x043b0x043b | Latin1_General_CI_AILatin1_General_CI_AI |
남부 라프어(스웨덴)Sami (Southern, Sweden) | 0x1c3b0x1c3b | 0x083b0x083b | Latin1_General_CI_AILatin1_General_CI_AI |
산스크리트어(인도)Sanskrit (India) | 0x044f0x044f | 0x04390x0439 | 서버 수준에서 사용할 수 없음Not available at server level |
세르비아어(보스니아 헤르체고비나, 키릴 자모)Serbian (Bosnia and Herzegovina, Cyrillic) | 0x1c1a0x1c1a | 0x0c1a0x0c1a | Latin1_General_CI_AILatin1_General_CI_AI |
세르비아어(보스니아 헤르체고비나, 라틴 문자)Serbian (Bosnia and Herzegovina, Latin) | 0x181a0x181a | 0x081a0x081a | Latin1_General_CI_AILatin1_General_CI_AI |
세르비아어(세르비아, 키릴 자모)Serbian (Serbia, Cyrillic) | 0x0c1a0x0c1a | 0x0c1a0x0c1a | Latin1_General_CI_AILatin1_General_CI_AI |
세르비아어(세르비아, 라틴 문자)Serbian (Serbia, Latin) | 0x081a0x081a | 0x081a0x081a | Latin1_General_CI_AILatin1_General_CI_AI |
세소토 사 레보아어/북부 소토어(남아프리카)Sesotho sa Leboa/Northern Sotho (South Africa) | 0x046c0x046c | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
세츠와나어/츠와나어(남아프리카)Setswana/Tswana (South Africa) | 0x04320x0432 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
스리랑카어(스리랑카)Sinhala (Sri Lanka) | 0x045b0x045b | 0x04390x0439 | 서버 수준에서 사용할 수 없음Not available at server level |
슬로바키아어(슬로바키아)Slovak (Slovakia) | 0x041b0x041b | 0x041b0x041b | Slovak_CI_ASSlovak_CI_AS |
슬로베니아어(슬로베니아)Slovenian (Slovenia) | 0x04240x0424 | 0x04240x0424 | Slovenian_CI_ASSlovenian_CI_AS |
스페인어(아르헨티나)Spanish (Argentina) | 0x2c0a0x2c0a | 0x0c0a0x0c0a | Modern_Spanish_CI_ASModern_Spanish_CI_AS |
스페인어(볼리비아)Spanish (Bolivia) | 0x400a0x400a | 0x0c0a0x0c0a | Modern_Spanish_CI_ASModern_Spanish_CI_AS |
스페인어(칠레)Spanish (Chile) | 0x340a0x340a | 0x0c0a0x0c0a | Modern_Spanish_CI_ASModern_Spanish_CI_AS |
스페인어(콜롬비아)Spanish (Colombia) | 0x240a0x240a | 0x0c0a0x0c0a | Modern_Spanish_CI_ASModern_Spanish_CI_AS |
스페인어(코스타리카)Spanish (Costa Rica) | 0x140a0x140a | 0x0c0a0x0c0a | Modern_Spanish_CI_ASModern_Spanish_CI_AS |
스페인어(도미니카 공화국)Spanish (Dominican Republic) | 0x1c0a0x1c0a | 0x0c0a0x0c0a | Modern_Spanish_CI_ASModern_Spanish_CI_AS |
스페인어(에콰도르)Spanish (Ecuador) | 0x300a0x300a | 0x0c0a0x0c0a | Modern_Spanish_CI_ASModern_Spanish_CI_AS |
스페인어(엘살바도르)Spanish (El Salvador) | 0x440a0x440a | 0x0c0a0x0c0a | Modern_Spanish_CI_ASModern_Spanish_CI_AS |
스페인어(과테말라)Spanish (Guatemala) | 0x100a0x100a | 0x0c0a0x0c0a | Modern_Spanish_CI_ASModern_Spanish_CI_AS |
스페인어(온두라스)Spanish (Honduras) | 0x480a0x480a | 0x0c0a0x0c0a | Modern_Spanish_CI_ASModern_Spanish_CI_AS |
스페인어(멕시코)Spanish (Mexico) | 0x080a0x080a | 0x0c0a0x0c0a | Modern_Spanish_CI_ASModern_Spanish_CI_AS |
스페인어(니카라과)Spanish (Nicaragua) | 0x4c0a0x4c0a | 0x0c0a0x0c0a | Modern_Spanish_CI_ASModern_Spanish_CI_AS |
스페인어(파나마)Spanish (Panama) | 0x180a0x180a | 0x0c0a0x0c0a | Modern_Spanish_CI_ASModern_Spanish_CI_AS |
스페인어(파라과이)Spanish (Paraguay) | 0x3c0a0x3c0a | 0x0c0a0x0c0a | Modern_Spanish_CI_ASModern_Spanish_CI_AS |
스페인어(페루)Spanish (Peru) | 0x280a0x280a | 0x0c0a0x0c0a | Modern_Spanish_CI_ASModern_Spanish_CI_AS |
스페인어(푸에르토리코)Spanish (Puerto Rico) | 0x500a0x500a | 0x0c0a0x0c0a | Modern_Spanish_CI_ASModern_Spanish_CI_AS |
스페인어(스페인)Spanish (Spain) | 0x0c0a0x0c0a | 0x0c0a0x0c0a | Modern_Spanish_CI_ASModern_Spanish_CI_AS |
스페인어(스페인, 전통 정렬)Spanish (Spain, Traditional Sort) | 0x040a0x040a | 0x040a0x040a | Traditional_Spanish_CI_ASTraditional_Spanish_CI_AS |
스페인어(미국)Spanish (United States) | 0x540a0x540a | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
스페인어(우루과이)Spanish (Uruguay) | 0x380a0x380a | 0x0c0a0x0c0a | Modern_Spanish_CI_ASModern_Spanish_CI_AS |
스페인어(베네수엘라)Spanish (Venezuela) | 0x200a0x200a | 0x0c0a0x0c0a | Modern_Spanish_CI_ASModern_Spanish_CI_AS |
스와힐리어(케냐)Swahili (Kenya) | 0x04410x0441 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
스웨덴어(핀란드)Swedish (Finland) | 0x081d0x081d | 0x040b0x040b | Finnish_Swedish_CI_ASFinnish_Swedish_CI_AS |
스웨덴어(스웨덴)Swedish (Sweden) | 0x041d0x041d | 0x040b0x040b | Finnish_Swedish_CI_ASFinnish_Swedish_CI_AS |
시리아어(시리아)Syriac (Syria) | 0x045a0x045a | 0x045a0x045a | 서버 수준에서 사용할 수 없음Not available at server level |
타지크어(타지키스탄)Tajik (Tajikistan) | 0x04280x0428 | 0x04190x0419 | Cyrillic_General_CI_ASCyrillic_General_CI_AS |
타마지트어(알레리, 라틴 문자)Tamazight (Algeria, Latin) | 0x085f0x085f | 0x085f0x085f | Latin1_General_CI_AILatin1_General_CI_AI |
타밀어(인도)Tamil (India) | 0x04490x0449 | 0x04390x0439 | 서버 수준에서 사용할 수 없음Not available at server level |
타타르어(러시아)Tatar (Russia) | 0x04440x0444 | 0x04440x0444 | Cyrillic_General_CI_ASCyrillic_General_CI_AS |
텔루구어(인도)Telugu (India) | 0x044a0x044a | 0x04390x0439 | 서버 수준에서 사용할 수 없음Not available at server level |
태국어(태국)Thai (Thailand) | 0x041e0x041e | 0x041e0x041e | Thai_CI_ASThai_CI_AS |
티베트어(중국)Tibetan (PRC) | 0x04510x0451 | 0x04510x0451 | 서버 수준에서 사용할 수 없음Not available at server level |
터키어(터키)Turkish (Turkey) | 0x041f0x041f | 0x041f0x041f | Turkish_CI_ASTurkish_CI_AS |
투르크멘어(투르크메니스탄)Turkmen (Turkmenistan) | 0x04420x0442 | 0x04420x0442 | Latin1_General_CI_AILatin1_General_CI_AI |
위구르어(중국)Uighur (PRC) | 0x04800x0480 | 0x04800x0480 | Latin1_General_CI_AILatin1_General_CI_AI |
우크라이나어(우크라이나)Ukrainian (Ukraine) | 0x04220x0422 | 0x04220x0422 | Ukrainian_CI_ASUkrainian_CI_AS |
고지 소르비아어(독일)Upper Sorbian (Germany) | 0x042e0x042e | 0x042e0x042e | Latin1_General_CI_AILatin1_General_CI_AI |
우르두어(파키스탄)Urdu (Pakistan) | 0x04200x0420 | 0x04200x0420 | Latin1_General_CI_AILatin1_General_CI_AI |
우즈베크어(우즈베키스탄, 키릴 자모)Uzbek (Uzbekistan, Cyrillic) | 0x08430x0843 | 0x04190x0419 | Cyrillic_General_CI_ASCyrillic_General_CI_AS |
우즈베크어(우즈베키스탄, 라틴 문자)Uzbek (Uzbekistan, Latin) | 0x04430x0443 | 0x04430x0443 | Uzbek_Latin_90_CI_ASUzbek_Latin_90_CI_AS |
베트남어(베트남)Vietnamese (Vietnam) | 0x042a0x042a | 0x042a0x042a | Vietnamese_CI_ASVietnamese_CI_AS |
웨일스어(영국)Welsh (United Kingdom) | 0x04520x0452 | 0x04520x0452 | Latin1_General_CI_AILatin1_General_CI_AI |
월로프어(세네갈)Wolof (Senegal) | 0x04880x0488 | 0x040c0x040c | French_CI_ASFrench_CI_AS |
코사어(남아프리카)Xhosa/isiXhosa (South Africa) | 0x04340x0434 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
이 문자(중국)Yi (PRC) | 0x04780x0478 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
요루바어(나이지리아)Yoruba (Nigeria) | 0x046a0x046a | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
줄루어(남아프리카)Zulu/isiZulu (South Africa) | 0x04350x0435 | 0x04090x0409 | Latin1_General_CI_ASLatin1_General_CI_AS |
서버에 데이터 정렬을 할당한 후에 데이터 정렬을 변경하려면 모든 데이터베이스 개체와 데이터를 내보내고 master 데이터베이스를 다시 빌드한 다음, 모든 데이터베이스 개체와 데이터를 다시 가져와야 합니다.After you've assigned a collation to the server, you can change it only by exporting all database objects and data, rebuilding the master database, and importing all database objects and data. SQL ServerSQL Server 인스턴스의 기본 데이터 정렬을 변경하는 대신 새 데이터베이스 또는 데이터베이스 열을 만들 때 원하는 데이터 정렬을 지정할 수 있습니다.Instead of changing the default collation of an instance of SQL ServerSQL Server, you can specify the desired collation when you create a new database or database column.
SQL ServerSQL Server 인스턴스에 대한 서버 데이터 정렬을 쿼리하려면 SERVERPROPERTY
함수를 사용합니다.To query the server collation for an instance of SQL ServerSQL Server, use the SERVERPROPERTY
function:
SELECT CONVERT(varchar, SERVERPROPERTY('collation'));
서버에서 사용 가능한 모든 데이터 정렬을 쿼리하려면 다음 fn_helpcollations()
기본 제공 함수를 사용합니다.To query the server for all available collations, use the following fn_helpcollations()
built-in function:
SELECT * FROM sys.fn_helpcollations();
데이터베이스 수준 데이터 정렬Database-level collations
데이터베이스를 만들거나 수정할 때 CREATE DATABASE
또는 ALTER DATABASE
문의 COLLATE
절을 사용하여 기본 데이터베이스 데이터 정렬을 지정할 수 있습니다.When you create or modify a database, you can use the COLLATE
clause of the CREATE DATABASE
or ALTER DATABASE
statement to specify the default database collation. 데이터 정렬을 지정하지 않으면 데이터베이스에 서버 데이터 정렬이 할당됩니다.If no collation is specified, the database is assigned the server collation.
서버의 데이터 정렬을 변경하는 경우에만 시스템 데이터베이스의 데이터 정렬을 변경할 수 있습니다.You can't change the collation of system databases unless you change the collation for the server.
데이터베이스 데이터 정렬은 데이터베이스의 모든 메타데이터에 사용되며, 이 데이터 정렬이 데이터베이스에 사용되는 모든 문자열 열, 임시 개체, 변수 이름 및 기타 모든 문자열의 기본값이 됩니다.The database collation is used for all metadata in the database, and the collation is the default for all string columns, temporary objects, variable names, and any other strings used in the database. 사용자 데이터베이스의 데이터 정렬을 변경할 경우 데이터베이스 액세스 임시 테이블에서 쿼리할 때 데이터 정렬 충돌이 발생할 수 있습니다.When you change the collation of a user database, there can be collation conflicts when queries in the database access temporary tables. 임시 테이블은 항상 tempdb 시스템 데이터베이스에 저장되므로, 인스턴스에 대한 데이터 정렬을 사용합니다.Temporary tables are always stored in the tempdb system database, which uses the collation for the instance. 사용자 데이터베이스와 tempdb 간의 문자 데이터를 비교하는 쿼리를 실행할 경우 문자 데이터를 평가할 때 데이터 정렬이 충돌하면 쿼리가 실패할 수 있습니다.Queries that compare character data between the user database and tempdb might fail if the collations cause a conflict in evaluating the character data. 쿼리에 COLLATE
절을 지정하면 이 문제를 해결할 수 있습니다.You can resolve this issue by specifying the COLLATE
clause in the query. 자세한 내용은 COLLATE(Transact-SQL)를 참조하세요.For more information, see COLLATE (Transact-SQL).
참고
Azure SQL DatabaseAzure SQL Database에서 데이터베이스를 만든 후에는 데이터 정렬을 변경할 수 없습니다.You can't change the collation after the database has been created on Azure SQL DatabaseAzure SQL Database.
사용자 데이터베이스의 데이터 정렬은 다음과 같은 ALTER DATABASE
문을 사용하여 변경할 수 있습니다.You can change the collation of a user database by using an ALTER DATABASE
statement that's similar to the following:
ALTER DATABASE myDB COLLATE Greek_CS_AI;
중요
데이터베이스 수준 데이터 정렬을 변경해도 열 수준 또는 식 수준 데이터 정렬은 영향을 받지 않습니다.Altering the database-level collation doesn't affect column-level or expression-level collations.
데이터베이스의 현재 데이터 정렬은 다음과 같은 문을 사용하여 검색할 수 있습니다.You can retrieve the current collation of a database by using a statement that's similar to the following:
SELECT CONVERT (VARCHAR(50), DATABASEPROPERTYEX('database_name','collation'));
열 수준 데이터 정렬Column-level collations
테이블을 만들거나 변경할 때 COLLATE
절을 사용하여 각 문자열 열의 데이터 정렬을 지정할 수 있습니다.When you create or alter a table, you can specify collations for each character-string column by using the COLLATE
clause. 데이터 정렬을 지정하지 않으면 데이터베이스의 기본 데이터 정렬이 열에 할당됩니다.If you don't specify a collation, the column is assigned the default collation of the database.
열의 데이터 정렬은 다음과 같은 ALTER TABLE
문을 사용하여 변경할 수 있습니다.You can change the collation of a column by using an ALTER TABLE
statement that's similar to the following:
ALTER TABLE myTable ALTER COLUMN mycol NVARCHAR(10) COLLATE Greek_CS_AI;
식 수준 데이터 정렬Expression-level collations
식 수준 데이터 정렬은 문이 실행될 때 설정되며 결과 집합이 반환되는 방식에 영향을 줍니다.Expression-level collations are set when a statement is run, and they affect the way a result set is returned. 따라서 ORDER BY
정렬 결과를 로캘별로 다르게 표시할 수 있습니다.This enables ORDER BY
sort results to be locale-specific. 식 수준 데이터 정렬을 구현하려면 다음과 같은 COLLATE
절을 사용합니다.To implement expression-level collations, use a COLLATE
clause such as the following:
SELECT name FROM customer ORDER BY name COLLATE Latin1_General_CS_AI;
로캘Locale
로캘은 위치나 문화권과 관련된 정보 집합입니다.A locale is a set of information that's associated with a location or a culture. 정보에는 음성 언어의 이름과 식별자, 언어를 기록하는 데 사용되는 스크립트, 문화권별 규칙 등이 포함될 수 있습니다.The information can include the name and identifier of the spoken language, the script that's used to write the language, and cultural conventions. 데이터 정렬은 하나 이상의 로캘과 연결될 수 있습니다.Collations can be associated with one or more locales. 자세한 내용은 참조 Microsoft에 의해 할당되는 로캘 ID를 참조하세요.For more information, see Locale IDs Assigned by Microsoft.
코드 페이지Code page
코드 페이지는 지정한 스크립트의 각 문자와 연결된 숫자 인덱스 또는 코드 포인트 값을 정렬한 문자 집합입니다.A code page is an ordered set of characters of a given script in which a numeric index, or code point value, is associated with each character. Windows 코드 페이지는 일반적으로 ‘문자 집합’ 또는 charset 이라고 합니다.A Windows code page is typically referred to as a character set or a charset. 코드 페이지는 여러 다른 Windows 시스템 로캘에 사용되는 문자 집합과 자판 배열을 지원하는 데 사용됩니다.Code pages are used to provide support for the character sets and keyboard layouts that are used by different Windows system locales.
정렬 순서Sort order
정렬 순서는 데이터 값이 정렬되는 방식을 지정합니다.Sort order specifies how data values are sorted. 순서는 데이터 비교 결과에 영향을 줍니다.The order affects the results of data comparison. 데이터는 데이터 정렬을 사용하여 정렬되며 인덱스를 사용하여 데이터 정렬을 최적화할 수 있습니다.Data is sorted by using collations, and it can be optimized by using indexes.
유니코드 지원Unicode support
유니코드는 코드 포인트를 문자에 매핑하기 위한 표준입니다.Unicode is a standard for mapping code points to characters. 유니코드는 전 세계 모든 언어의 모든 문자를 지원하도록 설계되었으므로, 문자 집합마다 다른 코드 페이지로 처리하지 않아도 됩니다.Because it's designed to cover all the characters of all the languages of the world, you don't need different code pages to handle different sets of characters.
유니코드 기본 사항Unicode basics
문자 데이터와 코드 페이지만 사용할 때 한 데이터베이스에 여러 언어의 데이터를 저장하면 이를 관리하기가 어렵습니다.Storing data in multiple languages within one database is difficult to manage when you use only character data and code pages. 필요한 언어별 문자를 모두 저장할 수 있는 하나의 데이터베이스 코드 페이지를 찾기도 어렵습니다.It's also difficult to find one code page for the database that can store all the required language-specific characters. 또한 다양한 코드 페이지를 실행하는 여러 클라이언트가 읽거나 업데이트하는 경우 특수 문자의 올바른 변환을 보장하기 어렵습니다.Additionally, it's difficult to guarantee the correct translation of special characters when they're being read or updated by a variety of clients that are running various code pages. 여러 언어의 클라이언트를 지원하는 데이터베이스는 항상 비유니코드 데이터 형식 대신 유니코드 데이터 형식을 사용해야 합니다.Databases that support international clients should always use Unicode data types instead of non-Unicode data types.
예를 들어 다음 세 가지 주요 언어를 처리해야 하는 북아메리카 고객 데이터베이스가 있다고 가정합니다.For example, consider a database of customers in North America that must handle three major languages:
- 멕시코에서 사용할 스페인어 이름 및 주소Spanish names and addresses for Mexico
- 퀘벡에서 사용할 프랑스어 이름 및 주소French names and addresses for Quebec
- 캐나다 및 미국에서 사용할 영어 이름 및 주소English names and addresses for the rest of Canada and the United States
문자 열과 코드 페이지만 사용하는 경우 세 가지 언어의 문자를 모두 처리할 코드 페이지와 함께 데이터베이스를 설치해야 합니다.When you use only character columns and code pages, you must take care to ensure that the database is installed with a code page that will handle the characters of all three languages. 또한 다른 언어의 코드 페이지를 실행하는 클라이언트에서 읽을 때 언어의 문자를 올바르게 변환해야 합니다.You must also take care to guarantee the correct translation of characters from any of the languages when the characters are read by clients that are running a code page for another language.
참고
클라이언트가 사용하는 코드 페이지는 OS(운영 체제) 설정에 따라 결정됩니다.The code pages that a client uses are determined by the operating system (OS) settings. Windows 운영 체제에서 클라이언트 코드 페이지를 설정하려면 제어판의 국가별 설정 을 사용하세요.To set client code pages on the Windows operating system, use Regional Settings in Control Panel.
전 세계 대상 그룹이 요구하는 모든 문자를 지원할 문자 데이터 형식 코드 페이지를 선택하기란 어렵습니다.It would be difficult to select a code page for character data types that will support all the characters that are required by a worldwide audience. 국제 데이터베이스에서 문자 데이터를 관리하는 가장 쉬운 방법은 항상 유니코드를 지원하는 데이터 형식을 사용하는 것입니다.The easiest way to manage character data in international databases is to always use a data type that supports Unicode.
유니코드 데이터 형식Unicode data types
SQL ServerSQL Server(SQL Server 2005(9.x)SQL Server 2005 (9.x) 이상)에서 여러 언어를 반영하는 문자 데이터를 저장할 경우에는 유니코드를 지원하지 않는 데이터 형식(char, varchar, and text) 대신 항상 유니코드 데이터 형식(nchar, nvarchar 및 ntext)을 사용하세요.If you store character data that reflects multiple languages in SQL ServerSQL Server (SQL Server 2005(9.x)SQL Server 2005 (9.x) and later), use Unicode data types (nchar, nvarchar, and ntext) instead of non-Unicode data types (char, varchar, and text).
참고
유니코드 데이터 형식의 경우 데이터베이스 엔진Database Engine에서 UCS-2를 사용하여 최대 65,535자 또는 보조 문자를 사용할 경우 전체 유니코드 범위(1,114,111자)를 나타낼 수 있습니다.For Unicode data types, the 데이터베이스 엔진Database Engine can represent up to 65,535 characters using UCS-2, or the full Unicode range (1,114,111 characters) if supplementary characters are used. 보조 문자를 사용하도록 설정하는 방법에 대한 자세한 내용은 보조 문자를 참조하세요.For more information about enabling supplementary characters, see Supplementary Characters.
또는 SQL Server 2019 (15.x)SQL Server 2019 (15.x)부터 UTF-8 지원 데이터 정렬(_UTF8)을 사용하는 경우 유니코드를 지원하지 않는 기존 데이터 형식(char 및 varchar)이 UTF-8 인코딩을 사용하는 유니코드 데이터 형식이 됩니다.Alternatively, starting with SQL Server 2019 (15.x)SQL Server 2019 (15.x), if a UTF-8 enabled collation (_UTF8) is used, previously non-Unicode data types (char and varchar) become Unicode data types using UTF-8 encoding. SQL Server 2019 (15.x)SQL Server 2019 (15.x)에서는 기존 유니코드 데이터 형식(nchar, nvarchar 및 ntext)의 동작이 변경되지 않으며 계속해서 UCS-2 또는 UTF-16 인코딩을 사용합니다.doesn't change the behavior of previously existing Unicode data types (nchar, nvarchar, and ntext), which continue to use UCS-2 or UTF-16 encoding. 자세한 내용은 UTF-8과 UTF-16 간의 스토리지 차이점을 참조하세요.For more information, see Storage differences between UTF-8 and UTF-16.
유니코드 고려 사항Unicode considerations
비유니코드 데이터 형식에는 여러 가지 제한 사항이 있습니다.Significant limitations are associated with non-Unicode data types. 유니코드를 지원하지 않는 컴퓨터는 단일 코드 페이지만 사용할 수 있기 때문입니다.This is because a non-Unicode computer is limited to using a single code page. 유니코드를 사용하면 코드 페이지 변환의 필요성이 줄어들기 때문에 성능이 향상될 수 있습니다.You might experience performance gain by using Unicode, because it requires fewer code-page conversions. 유니코드 데이터 정렬은 서버 수준에서 지원되지 않으므로 데이터베이스, 열 또는 식 수준에서 개별적으로 선택해야 합니다.Unicode collations must be selected individually at the database, column, or expression level because they aren't supported at the server level.
서버에서 클라이언트로 데이터를 이동할 때는 기존 클라이언트 드라이버에서 서버 데이터 정렬을 인식하지 못할 수 있습니다.When you move data from a server to a client, your server collation might not be recognized by older client drivers. 유니코드 서버에서 비유니코드 클라이언트로 데이터를 이동할 때 이러한 현상이 나타날 수 있습니다.This can occur when you move data from a Unicode server to a non-Unicode client. 클라이언트 운영 체제를 업그레이드하여 기본 시스템 데이터 정렬을 업데이트하는 것이 가장 좋은 방법입니다.Your best option might be to upgrade the client operating system so that the underlying system collations are updated. 클라이언트에 데이터베이스 클라이언트 소프트웨어가 설치되어 있는 경우에는 해당 데이터베이스 클라이언트 소프트웨어에 서비스 업데이트를 적용하는 것도 좋습니다.If the client has database client software installed, you might consider applying a service update to the database client software.
팁
또한 서버의 데이터에 대해 다른 데이터 정렬을 사용할 수도 있습니다.You can also try to use a different collation for the data on the server. 클라이언트의 코드 페이지에 매핑되는 데이터 정렬을 선택하세요.Choose a collation that maps to a code page on the client.
일부 유니코드 문자의 검색 및 정렬 성능을 향상하기 위해 SQL ServerSQL Server(SQL Server 2012(11.x)SQL Server 2012 (11.x) 이상)에서 제공되는 UTF-16 데이터 정렬(Windows 데이터 정렬만 해당)을 사용하려면, 보조 문자(_SC) 데이터 정렬 중 하나 또는 버전 140 데이터 정렬 중 하나를 선택할 수 있습니다.To use the UTF-16 collations that are available in SQL ServerSQL Server (SQL Server 2012(11.x)SQL Server 2012 (11.x) and later) to improve searching and sorting of some Unicode characters (Windows collations only), you can select either one of the supplementary characters (_SC) collations or one of the version 140 collations.
SQL Server 2019 (15.x)SQL Server 2019 (15.x)에서 제공되는 UTF-8 데이터 정렬을 사용하고 일부 유니코드 문자의 검색 및 정렬을 향상하려면(Windows 데이터 정렬만 해당), UTF-8 인코딩 지원 데이터 정렬(_UTF8)을 선택해야 합니다.To use the UTF-8 collations that are available in SQL Server 2019 (15.x)SQL Server 2019 (15.x), and to improve searching and sorting of some Unicode characters (Windows collations only), you must select UTF-8 encoding-enabled collations(_UTF8).
UTF8 플래그는 다음에 적용할 수 있습니다.The UTF8 flag can be applied to:
- 보충 문자(_SC) 또는 변형 선택기 구분(_VSS) 인식을 이미 지원하는 언어적 데이터 정렬Linguistic collations that already support supplementary characters (_SC) or variation-selector-sensitive (_VSS) awareness
- BIN21 이진 데이터 정렬BIN21 binary collation
UTF8 플래그는 다음에 적용할 수 없습니다.The UTF8 flag can't be applied to:
- 보충 문자(_SC) 또는 변형 선택기 구분(_VSS) 인식을 지원하지 않는 언어적 데이터 정렬Linguistic collations that don't support supplementary characters (_SC) or variation-selector-sensitive (_VSS) awareness
- BIN 또는 BIN22 이진 데이터 정렬The BIN or BIN22 binary collations
- SQL_* 데이터 정렬The SQL_* collations
1SQL Server 2019 (15.x)SQL Server 2019 (15.x) CTP 2.3부터 지원됩니다.1 Starting with SQL Server 2019 (15.x)SQL Server 2019 (15.x) CTP 2.3. SQL Server 2019 (15.x)SQL Server 2019 (15.x) CTP 3.0에서는 UTF8_BIN2 데이터 정렬이 Latin1_General_100_BIN2_UTF8 로 바뀌었습니다.CTP 3.0 replaced collation UTF8_BIN2 with Latin1_General_100_BIN2_UTF8.
2SQL Server 2019 (15.x)SQL Server 2019 (15.x) CTP 2.3까지 지원됩니다.2 Up to with SQL Server 2019 (15.x)SQL Server 2019 (15.x) CTP 2.3.
유니코드 데이터 형식 또는 비유니코드 데이터 형식 사용과 관련된 문제점을 평가하려면 작업 시나리오를 테스트하여 사용자 환경에서 나타나는 성능 차이를 측정하세요.To evaluate issues that are related to using Unicode or non-Unicode data types, test your scenario to measure performance differences in your environment. 조직 전반의 시스템에 사용되는 데이터 정렬을 표준화하고, 가능한 경우 항상 유니코드 서버와 클라이언트를 배포하는 것이 좋습니다.It's a good practice to standardize the collation that's used on systems across your organization, and to deploy Unicode servers and clients wherever possible.
대부분의 경우 SQL ServerSQL Server는 다른 서버나 클라이언트와 상호 작용하며, 조직에서 애플리케이션과 서버 인스턴스 간에 여러 데이터 액세스 표준을 사용할 수 있습니다.In many situations, SQL ServerSQL Server interacts with other servers or clients, and your organization might use multiple data-access standards between applications and server instances. SQL ServerSQL Server 클라이언트는 다음의 두 가지 주요 유형 중 하나에 해당됩니다.clients are one of two main types:
- OLE DB 및 ODBC(Open Database Connectivity) 버전 3.7 이상을 사용하는 유니코드 클라이언트Unicode clients that use OLE DB and Open Database Connectivity (ODBC) version 3.7 or later.
- ODBC 버전 3.6 또는 이전 버전과 DB-Library를 사용하는 유니코드를 지원하지 않는 클라이언트Non-Unicode clients that use DB-Library and ODBC version 3.6 or earlier.
다음 표에서는 유니코드 서버와 유니코드를 지원하지 않는 서버의 다양한 결합에서 다국어 데이터를 사용하는 방법을 설명합니다.The following table provides information about using multilingual data with various combinations of Unicode and non-Unicode servers:
서버Server | ClientClient | 이점 또는 제한 사항Benefits or limitations |
---|---|---|
UnicodeUnicode | UnicodeUnicode | 유니코드 데이터는 시스템 전체에서 사용되므로 이 시나리오는 검색한 데이터가 손상되지 않는 등 최상의 성능을 제공합니다.Because Unicode data is used throughout the system, this scenario provides the best performance and protection from corruption of retrieved data. ADO(ActiveX Data Objects), OLE DB 및 ODBC 버전 3.7 이상이 여기에 해당됩니다.This is the situation with ActiveX Data Objects (ADO), OLE DB, and ODBC version 3.7 or later. |
UnicodeUnicode | 비유니코드Non-Unicode | 이 시나리오에서, 특히 새로운 운영 체제를 실행하는 서버와 이전 버전의 SQL ServerSQL Server 또는 이전 운영 체제를 실행하는 클라이언트 간의 연결에서는 데이터를 클라이언트 컴퓨터로 이동할 때 제한 사항 또는 오류가 발생할 수 있습니다.In this scenario, especially with connections between a server that's running a newer operating system and a client that's running an earlier version of SQL ServerSQL Server, or on an older operating system, there can be limitations or errors when you move data to a client computer. 서버의 유니코드 데이터는 데이터 변환을 위해 비유니코드 클라이언트의 해당 코드 페이지에 매핑을 시도합니다.Unicode data on the server tries to map to a corresponding code page on the non-Unicode client to convert the data. |
비유니코드Non-Unicode | UnicodeUnicode | 다국어 데이터 사용에 적합한 구성이 아닙니다.This isn't an ideal configuration for using multilingual data. 유니코드 데이터를 유니코드를 지원하지 않는 서버에 쓸 수 없습니다.You can't write Unicode data to the non-Unicode server. 서버의 코드 페이지를 벗어나는 서버로 데이터를 보낼 때 문제가 발생할 수 있습니다.Problems are likely to occur when data is sent to servers that are outside the server's code page. |
비유니코드Non-Unicode | 비유니코드Non-Unicode | 다국어 데이터를 사용할 때 가장 제한이 많은 시나리오입니다.This is a very limiting scenario for multilingual data. 단일 코드 페이지만 사용할 수 있습니다.You can use only a single code page. |
보조 문자Supplementary characters
유니코드 컨소시엄에서는 각 문자에 000000~10FFFF 범위의 값인 고유 코드 포인트를 할당합니다.The Unicode Consortium allocates to each character a unique code point, which is a value in the range 000000–10FFFF. 가장 많이 사용되는 문자의 코드 포인트 값은 000000~00FFFF(65,535자) 범위이며, 메모리 및 디스크에서 8비트 또는 16비트의 한 단어에 들어갑니다.The most frequently used characters have code point values in the range 000000–00FFFF (65,535 characters) which fit into an 8-bit or 16-bit word in memory and on-disk. 이 범위는 일반적으로 BMP(기본 다국어 평면)로 지정됩니다.This range is usually designated as the Basic Multilingual Plane (BMP).
그러나 유니코드 컨소시엄에서는 각각 BMP와 동일한 크기인 16개의 문자 “평면”을 추가로 설정했습니다.But the Unicode Consortium has established 16 additional "planes" of characters, each the same size as the BMP. 이 정의에 따라 유니코드는 코드 포인트 범위 000000~10FFFF 내에서 1,114,112자(즉, 216x17자)를 나타낼 수 있습니다.This definition allows Unicode the potential to represent 1,114,112 characters (that is, 216 * 17 characters) within the code point range 000000–10FFFF. 코드 포인트 값이 00FFFF보다 큰 문자에는 2~4개의 연속 8비트 단어(UTF-8) 또는 2개의 연속 16비트 단어(UTF-16)가 필요합니다.Characters with code point values larger than 00FFFF require two to four consecutive 8-bit words (UTF-8), or two consecutive 16-bit words (UTF-16). BMP 초과 범위에 있는 이러한 문자를 보조 문자 라고 하고, 추가적인 연속 8비트 또는 16비트 단어를 서로게이트 쌍 이라고 합니다.These characters located beyond the BMP are called supplementary characters, and the additional consecutive 8-bit or 16-bit words are called surrogate pairs. 보조 문자, 서로게이트, 서로게이트 쌍에 대한 자세한 내용은 유니코드 표준을 참조하세요.For more information about supplementary characters, surrogates, and surrogate pairs, refer to the Unicode Standard.
SQL ServerSQL Server에서는 데이터베이스 엔진Database Engine에서 UCS-2를 사용하여 인코딩하는 BMP 범위(000000~00FFFF)에 유니코드 데이터를 저장하기 위해 nchar, nvarchar 등의 데이터 형식을 제공합니다.provides data types such as nchar and nvarchar to store Unicode data in the BMP range (000000–00FFFF), which the 데이터베이스 엔진Database Engine encodes using UCS-2.
SQL Server 2012(11.x)SQL Server 2012 (11.x)에서 도입된 일련의 새 보조 문자(_SC) 데이터 정렬을 nchar, nvarchar 및 sql_variant 데이터 형식에 사용하여 전체 유니코드 문자 범위(000000~10FFFF)를 나타낼 수 있습니다.introduced a new family of supplementary character (_SC) collations that can be used with the nchar, nvarchar, and sql_variant data types to represent the full Unicode character range (000000–10FFFF). 예를 들면 다음과 같습니다. Latin1_General_100_CI_AS_SC 또는 일본어 데이터 정렬을 사용하는 경우 Japanese_Bushu_Kakusu_100_CI_AS_SC 가 여기에 해당합니다.For example: Latin1_General_100_CI_AS_SC or, if you're using a Japanese collation, Japanese_Bushu_Kakusu_100_CI_AS_SC.
SQL Server 2019 (15.x)SQL Server 2019 (15.x)에서는 새로운 UTF-8 지원 데이터 정렬(_UTF8)을 사용하는 char 및 varchar 데이터 형식까지 보조 문자 지원을 확장합니다.extends supplementary character support to the char and varchar data types with the new UTF-8 enabled collations (_UTF8). 이 데이터 형식도 전체 유니코드 문자 범위를 나타낼 수 있습니다.These data types are also capable of representing the full Unicode character range.
참고
SQL Server 2014(12.x)SQL Server 2014 (12.x)부터 새로운 모든 _140 데이터 정렬에서 자동으로 보조 문자를 지원합니다.Starting with SQL Server 2014(12.x)SQL Server 2014 (12.x), all new _140 collations automatically support supplementary characters.
보조 문자를 사용하는 경우If you use supplementary characters:
데이터 정렬 버전 90 이상에서 정렬 및 비교 연산에 보조 문자를 사용할 수 있습니다.Supplementary characters can be used in ordering and comparison operations in collation versions 90 or greater.
버전 100 데이터 정렬은 모두 보조 문자를 사용한 언어적 정렬을 지원합니다.All version 100 collations support linguistic sorting with supplementary characters.
데이터베이스 개체 이름 등의 메타데이터에는 보조 문자를 사용할 수 없습니다.Supplementary characters aren't supported for use in metadata, such as in names of database objects.
SC 플래그는 다음에 적용할 수 있습니다.The SC flag can be applied to:
- 버전 90 데이터 정렬Version 90 collations
- 버전 100 데이터 정렬Version 100 collations
SC 플래그는 다음에 적용할 수 없습니다.The SC flag can't be applied to:
- 버전 80 버전이 지정되지 않은 Windows 데이터 정렬Version 80 non-versioned Windows collations
- BIN 또는 BIN2 이진 데이터 정렬The BIN or BIN2 binary collations
- SQL* 데이터 정렬The SQL* collations
- 버전 140 데이터 정렬(이미 보조 문자를 지원하기 때문에 SC 플래그가 필요하지 않음)Version 140 collations (these don't need the SC flag, because they already support supplementary characters)
다음 표에서는 보조 문자를 SCA(보조 문자 인식) 데이터 정렬과 함께 사용할 경우와 그렇지 않을 때 일부 문자열 함수 및 문자열 연산자의 동작을 비교합니다.The following table compares the behavior of some string functions and string operators when they use supplementary characters with and without a supplementary character-aware (SCA) collation:
문자열 함수 또는 연산자String function or operator | SCA 데이터 정렬 사용With an SCA collation | SCA 데이터 정렬 사용 안 함Without an SCA collation |
---|---|---|
CHARINDEXCHARINDEX LENLEN PATINDEXPATINDEX |
UTF-16 서로게이트 쌍이 단일 코드 포인트로 계산됩니다.The UTF-16 surrogate pair is counted as a single code point. | UTF-16 서로게이트 쌍이 두 개의 코드 포인트로 계산됩니다.The UTF-16 surrogate pair is counted as two code points. |
LEFTLEFT REPLACEREPLACE REVERSEREVERSE RIGHTRIGHT SUBSTRINGSUBSTRING STUFFSTUFF |
함수가 각 서로게이트 쌍을 단일 코드 포인트로 처리하며 올바르게 작동합니다.These functions treat each surrogate pair as a single code point and work as expected. | 함수가 서로게이트 쌍을 분할하여 예기치 않은 결과가 발생할 수 있습니다.These functions might split any surrogate pairs and lead to unexpected results. |
NCHARNCHAR | 0~0x10FFFF 범위의 지정된 유니코드 코드 포인트 값에 해당하는 문자를 반환합니다.Returns the character that corresponds to the specified Unicode code point value in the range 0–0x10FFFF. 지정된 값이 0~0xFFFF 범위에 있을 경우 하나의 문자가 반환됩니다.If the specified value lies in the range 0–0xFFFF, one character is returned. 값이 더 높을 경우 해당 서로게이트가 반환됩니다.For higher values, the corresponding surrogate is returned. | 0xFFFF보다 큰 값은 해당 서로게이트 대신 NULL을 반환합니다.A value higher than 0xFFFF returns NULL instead of the corresponding surrogate. |
UNICODEUNICODE | 0~0x10FFFF 범위의 UTF-16 코드 포인트를 반환합니다.Returns a UTF-16 code point in the range 0–0x10FFFF. | 0~0xFFFF 범위의 UCS-2 코드 포인트를 반환합니다.Returns a UCS-2 code point in the range 0–0xFFFF. |
와일드카드 - 문자 하나와 일치Match One Character Wildcard 와일드카드 - 일치하지 않는 문자Wildcard - Character(s) Not to Match |
모든 와일드카드 연산에 보조 문자를 사용할 수 있습니다.Supplementary characters are supported for all wildcard operations. | 이러한 와일드카드 연산에 보조 문자를 사용할 수 없습니다.Supplementary characters aren't supported for these wildcard operations. 다른 와일드카드 연산자는 사용할 수 있습니다.Other wildcard operators are supported. |
GB18030 지원GB18030 support
GB18030은 중국에서 사용하는 별개의 중국어 인코딩 표준입니다.GB18030 is a separate standard that's used in the People's Republic of China for encoding Chinese characters. GB18030에서 문자 길이는 1바이트, 2바이트 또는 4바이트일 수 있습니다.In GB18030, characters can be 1, 2, or 4 bytes in length. SQL ServerSQL Server 에서는 서버가 클라이언트 쪽 애플리케이션으로부터 GB18030으로 인코딩된 문자를 받을 때 해당 문자를 인식하고 유니코드 문자로 기본 변환 및 저장하는 방식으로 GB18030 문자를 지원합니다.provides support for GB18030-encoded characters by recognizing them when they enter the server from a client-side application and converting and storing them natively as Unicode characters. 이렇게 변환된 문자는 서버에 저장된 후 모든 후속 작업에서 유니코드 문자로 처리됩니다.After they're stored in the server, they're treated as Unicode characters in any subsequent operations.
모든 중국어 데이터 정렬(가급적 최신 100 버전)을 사용할 수 있습니다.You can use any Chinese collation, preferably the latest 100 version. 모든 _100 수준 데이터 정렬은 GB18030 문자를 사용한 언어적 정렬을 지원합니다.All _100 level collations support linguistic sorting with GB18030 characters. 데이터에 보조 문자(서로게이트 쌍)가 포함되어 있는 경우 SQL ServerSQL Server에서 제공되는 SC 데이터 정렬을 사용하여 검색 및 정렬 성능을 향상할 수 있습니다.If the data includes supplementary characters (surrogate pairs), you can use the SC collations that are available in SQL ServerSQL Server to improve searching and sorting.
참고
SQL Server Management StudioSQL Server Management Studio 등의 클라이언트 도구가 Dengxian 글꼴을 사용하여 GB18030 인코딩된 문자를 포함하는 문자열을 올바르게 표시하는지 확인합니다.Ensure that your client tools, such as SQL Server Management StudioSQL Server Management Studio, use the Dengxian font to correctly display strings that contain GB18030-encoded characters.
복합 스크립트 지원Complex script support
SQL ServerSQL Server 에서는 복합 스크립트를 입력, 저장, 변경 및 표시할 수 있습니다.can support inputting, storing, changing, and displaying complex scripts. 복합 스크립트에는 다음 형식이 포함됩니다.Complex scripts include the following types:
- 아랍어 텍스트와 영어 텍스트의 조합과 같은 오른쪽에서 왼쪽으로 쓰는 텍스트와 왼쪽에서 오른쪽으로 쓰는 텍스트의 조합을 포함하는 양방향 텍스트Scripts that include the combination of both right-to-left and left-to-right text, such as a combination of Arabic and English text.
- 아랍어, 인도어, 태국어 문자와 같이 위치에 따라 문자 모양이 바뀌거나 다른 문자와 함께 사용되면 문자 모양이 바뀌는 양방향 텍스트Scripts whose characters change shape depending on their position, or when combined with other characters, such as Arabic, Indic, and Thai characters.
- 태국어와 같이 단어 사이를 구분하는 공백이 없어 단어 인식을 위해 내부 사전이 필요한 언어Languages, such as Thai, that require internal dictionaries to recognize words because there are no breaks between them.
SQL ServerSQL Server 와 상호 작용하는 데이터베이스 애플리케이션은 복합 스크립트를 지원하는 컨트롤을 사용해야 합니다.Database applications that interact with SQL ServerSQL Server must use controls that support complex scripts. 관리형 코드로 생성된 표준 Windows 폼 컨트롤에서는 복합 스크립트를 사용할 수 있습니다.Standard Windows form controls that are created in managed code are complex-script-enabled.
일본어 데이터 정렬이 SQL Server 2017(14.x)SQL Server 2017 (14.x)에 추가됨Japanese collations added in SQL Server 2017(14.x)SQL Server 2017 (14.x)
SQL Server 2017(14.x)SQL Server 2017 (14.x)부터 다양한 옵션(_CS, _AS, _KS, _WS, _VSS)의 순열을 사용하여 새 일본어 데이터 정렬 패밀리가 지원됩니다.Starting with SQL Server 2017(14.x)SQL Server 2017 (14.x), new Japanese collation families are supported, with the permutations of various options (_CS, _AS, _KS, _WS, and _VSS).
이러한 데이터 정렬을 나열하기 위해 SQL Server 데이터베이스 엔진SQL Server Database Engine을 쿼리할 수 있습니다.To list these collations, you can query the SQL Server 데이터베이스 엔진SQL Server Database Engine:
SELECT Name, Description FROM fn_helpcollations()
WHERE Name LIKE 'Japanese_Bushu_Kakusu_140%' OR Name LIKE 'Japanese_XJIS_140%'
새 데이터 정렬은 모두 보조 문자를 기본적으로 지원하므로 새 _140 데이터 정렬에 SC 플래그가 없거나 필요하지 않습니다.All the new collations have built-in support for supplementary characters, so none of the new _140 collations has (or needs) the SC flag.
이러한 데이터 정렬은 데이터베이스 엔진Database Engine 인덱스, 메모리 최적화 테이블, columnstore 인덱스 및 고유하게 컴파일된 모듈에서 지원됩니다.These collations are supported in 데이터베이스 엔진Database Engine indexes, memory-optimized tables, columnstore indexes, and natively compiled modules.
UTF-8 지원UTF-8 support
SQL Server 2019 (15.x)SQL Server 2019 (15.x)에서는 가져오기 또는 내보내기 인코딩 및 문자열 데이터의 데이터베이스 수준 또는 열 수준 데이터 정렬로 널리 사용되는 UTF-8 문자 인코딩이 완벽하게 지원됩니다.introduces full support for the widely used UTF-8 character encoding as an import or export encoding, and as database-level or column-level collation for string data. UTF-8은 char 및 varchar 데이터 형식에서 허용되며, UTF8 접미사가 있는 데이터 정렬을 만들거나 개체의 데이터 정렬을 이 데이터 정렬로 변경하면 사용할 수 있습니다.UTF-8 is allowed in the char and varchar data types, and it's enabled when you create or change an object's collation to a collation that has a UTF8 suffix. 예를 들어 LATIN1_GENERAL_100_CI_AS_SC 를 LATIN1_GENERAL_100_CI_AS_SC_UTF8 로 변경하는 경우가 여기에 해당합니다.One example is changing LATIN1_GENERAL_100_CI_AS_SC to LATIN1_GENERAL_100_CI_AS_SC_UTF8.
UTF-8은 SQL Server 2012(11.x)SQL Server 2012 (11.x)에서 도입된 보조 문자를 지원하는 Windows 데이터 정렬에서만 사용할 수 있습니다.UTF-8 is available only to Windows collations that support supplementary characters, as introduced in SQL Server 2012(11.x)SQL Server 2012 (11.x). nchar 및 nvarchar 데이터 형식은 UCS-2 또는 UTF-16 인코딩만 허용하며 변경되지 않고 그대로 유지됩니다.The nchar and nvarchar data types allow UCS-2 or UTF-16 encoding only, and they remain unchanged.
UTF-8과 UTF-16 간의 스토리지 차이점Storage differences between UTF-8 and UTF-16
유니코드 컨소시엄에서는 각 문자에 000000~10FFFF 범위의 값인 고유 코드 포인트를 할당합니다.The Unicode Consortium allocates to each character a unique code point, which is a value in the range 000000–10FFFF. SQL Server 2019 (15.x)SQL Server 2019 (15.x)에서는 UTF-8 및 UTF-16 인코딩을 모두 사용해서 전체 범위를 나타낼 수 있습니다.With SQL Server 2019 (15.x)SQL Server 2019 (15.x), both UTF-8 and UTF-16 encodings are available to represent the full range:
- UTF-8 인코딩에서는 ASCII 범위(000000~00007F)의 문자에 1바이트가 필요하고, 코드 포인트 000080~0007FF에 2바이트가 필요하며, 코드 포인트 000800~00FFFF에 3바이트가 필요하고, 코드 포인트 0010000~0010FFFF에 4바이트가 필요합니다.With UTF-8 encoding, characters in the ASCII range (000000–00007F) require 1 byte, code points 000080–0007FF require 2 bytes, code points 000800–00FFFF require 3 bytes, and code points 0010000–0010FFFF require 4 bytes.
- UTF-16 인코딩에서는 코드 포인트 000000~00FFFF에 2바이트가 필요하고, 코드 포인트 0010000~0010FFFF에 4바이트가 필요합니다.With UTF-16 encoding, code points 000000–00FFFF require 2 bytes, and code points 0010000–0010FFFF require 4 bytes.
다음 표에는 각 문자 범위와 인코딩 형식의 인코딩 스토리지 크기(바이트)가 나와 있습니다.The following table lists the encoding storage bytes for each character range and encoding type:
코드 범위(16진수)Code range (hexadecimal) | 코드 범위(10진수)Code range (decimal) | UTF-8의 스토리지 크기(바이트)1Storage bytes1 with UTF-8 | UTF-16의 스토리지 크기(바이트)1Storage bytes1 with UTF-16 |
---|---|---|---|
000000~00007F000000–00007F | 0~1270–127 | 11 | 22 |
000080~00009F000080–00009F 0000A0~0003FF0000A0–0003FF 000400~0007FF000400–0007FF |
128~159128–159 160~1,023160–1,023 1,024~2,0471,024–2,047 |
22 | 22 |
000800~003FFF000800–003FFF 004000~00FFFF004000–00FFFF |
2,048~16,3832,048–16,383 16,384~65,53516,384–65,535 |
33 | 22 |
010000~03FFFF2010000–03FFFF2 040000~10FFFF2040000–10FFFF2 |
65,536~262,143265,536–262,1432 262,144~1,114,1112262,144–1,114,1112 |
44 | 44 |
1 ‘스토리지 크기(바이트)’는 인코딩된 바이트 길이를 가리키며, 데이터 형식의 디스크 스토리지 크기가 아닙니다.1 Storage bytes refers to the encoded byte length, not the data-type on-disk storage size. 디스크 스토리지 크기에 대한 자세한 내용은 nchar 및 nvarchar 및 char 및 varchar를 참조하세요.For more information about on-disk storage sizes, see nchar and nvarchar and char and varchar.
2보조 문자의 코드 포인트 범위입니다.2 The code point range for supplementary characters.
팁
CHAR(n) 및 VARCHAR(n) 또는 NCHAR(n) 및 NVARCHAR(n)에서 n 이 문자 수를 정의한다고 잘못 생각하는 경우가 많습니다.It's common to think, in CHAR(n) and VARCHAR(n) or in NCHAR(n) and NVARCHAR(n), that n defines the number of characters. CHAR(10) 열의 예제에서 Latin1_General_100_CI_AI 와 같은 데이터 정렬을 사용하여 0~127 범위의 ASCII 문자 10자를 저장할 수 있기 때문입니다. 이 범위의 각 문자는 1바이트만 사용합니다.This is because, in the example of a CHAR(10) column, 10 ASCII characters in the range 0–127 can be stored by using a collation such as Latin1_General_100_CI_AI, because each character in this range uses only 1 byte.
그러나 CHAR(n) 및 VARCHAR(n)의 n 은 ‘바이트’(0~8,000) 단위로 문자열 크기를 정의하고, NCHAR(n) 및 NVARCHAR(n)의 n 은 ‘바이트 쌍’(0~4,000)으로 문자열 크기를 정의합니다. However, in CHAR(n) and VARCHAR(n), n defines the string size in bytes (0–8,000), and in NCHAR(n) and NVARCHAR(n), n defines the string size in byte-pairs (0–4,000). n 은 저장할 수 있는 문자 수를 정의하지 않습니다.n never defines numbers of characters that can be stored.
방금 확인한 것처럼, 적절한 유니코드 인코딩과 데이터 형식을 선택하면 사용 중인 문자 집합에 따라 스토리지 비용을 훨씬 절감하거나 현재 스토리지 공간을 늘릴 수 있습니다.As you've just seen, choosing the appropriate Unicode encoding and data type might give you significant storage savings or increase your current storage footprint, depending on the character set in use. 예를 들어 Latin1_General_100_CI_AI_SC_UTF8 과 같은 UTF-8 지원 라틴어 데이터 정렬을 사용하는 경우 CHAR(10)
열은 10바이트를 저장하며, 0~127 범위의 ASCII 문자 10자를 포함할 수 있습니다.For example, when you use a Latin collation that's UTF-8 enabled, such as Latin1_General_100_CI_AI_SC_UTF8, a CHAR(10)
column stores 10 bytes and can hold 10 ASCII characters in the range 0–127. 그러나 128~2047 범위는 5자, 2048~65535 범위는 3자만 포함할 수 있습니다.But it can hold only 5 characters in the range 128–2047 and only 3 characters in the range 2048–65535. 반면, NCHAR(10)
열은 10바이트 쌍(20바이트)을 저장하기 때문에 0~65535 범위의 문자 10자를 포함할 수 있습니다.By comparison, because a NCHAR(10)
column stores 10 byte-pairs (20 bytes), it can hold 10 characters in the range 0–65535.
데이터베이스나 열에 UTF-8 또는 UTF-16 인코딩을 사용할지 여부를 선택하기 전에 저장되는 문자열 데이터의 분포를 고려합니다.Before you choose whether to use UTF-8 or UTF-16 encoding for a database or column, consider the distribution of string data that will be stored:
- 대체로 ASCII 범위 0~127을 사용하는 경우(예: 영어), UTF-8에서는 각 문자에 1바이트, UTF-16에서는 2바이트가 필요합니다.If it's mostly in the ASCII range 0–127 (such as English), each character requires 1 byte with UTF-8 and 2 bytes with UTF-16. UTF-8을 사용하는 것이 스토리지 측면에서 효율적입니다.Using UTF-8 provides storage benefits. UTF-8 지원 데이터 정렬을 사용하여 0~127 범위의 ASCII 문자를 포함하는 기존 열 데이터 형식을
NCHAR(10)
에서CHAR(10)
로 변경하면 스토리지 요구 사항이 50% 감소합니다.Changing an existing column data type with ASCII characters in the range 0–127 fromNCHAR(10)
toCHAR(10)
, and using an UTF-8 enabled collation, translates into a 50 percent reduction in storage requirements. 이러한 감소는NCHAR(10)
는 스토리지로 20바이트가 필요하지만CHAR(10)
는 동일한 유니코드 문자열 표현에 10바이트만 필요하기 때문입니다.This reduction is becauseNCHAR(10)
requires 20 bytes for storage, compared withCHAR(10)
, which requires 10 bytes for the same Unicode string representation. - ASCII 범위를 초과하는 거의 모든 라틴어 기반 스크립트와 그리스어, 키릴 자모, 콥트어, 아르메니아어, 히브리어, 아랍어, 시리아어, 타나 문자, 은코 문자는 UTF-8과 UTF-16에서 모두, 문자당 2바이트가 필요합니다.Above the ASCII range, almost all Latin-based script, and Greek, Cyrillic, Coptic, Armenian, Hebrew, Arabic, Syriac, Tāna, and N’Ko, require 2 bytes per character in both UTF-8 and UTF-16. 이러한 경우에는 비교 가능한 데이터 형식 간(예: char 또는 nchar 사용 간)에 큰 스토리지 차이가 없습니다.In these cases, there aren't significant storage differences for comparable data types (for example, between using char or nchar).
- 대체로 동아시아 스크립트인 경우(예: 한국어, 중국어, 일본어), UTF-8에서는 각 문자에 3바이트, UTF-16에서는 2바이트가 필요합니다.If it's mostly East Asian script (such as Korean, Chinese, and Japanese), each character requires 3 bytes with UTF-8 and 2 bytes with UTF-16. UTF-16을 사용하는 것이 스토리지 측면에서 효율적입니다.Using UTF-16 provides storage benefits.
- 010000~10FFFF 범위의 문자는 UTF-8과 UTF-16에서 모두, 4바이트가 필요합니다.Characters in the range 010000–10FFFF require 4 bytes in both UTF-8 and UTF-16. 이러한 경우에는 비교 가능한 데이터 형식 간(예: char 또는 nchar 사용 간)에 스토리지 차이가 없습니다.In these cases, there aren't storage differences for comparable data types (for example, between using char or nchar).
다른 고려 사항은 국가별 Transact-SQL 문 작성을 참조하세요.For other considerations, see Write International Transact-SQL Statements.
UTF-8로 변환Converting to UTF-8
CHAR(n) 및 VARCHAR(n)에서 또는 NCHAR(n) 및 NVARCHAR(n)에서 n 은 저장할 수 있는 문자 수가 아니라 스토리지 크기(바이트)를 정의하므로 데이터 잘림을 방지하기 위해 변환해야 하는 데이터 형식 크기를 결정하는 것이 중요합니다.Because in CHAR(n) and VARCHAR(n) or in NCHAR(n) and NVARCHAR(n), the n defines the byte storage size, not the number of characters that can be stored, it's important to determine the data type size you must convert to, in order to avoid data truncation.
예를 들어 180바이트의 일본어 문자를 저장하는 NVARCHAR(100) 으로 정의된 열이 있다고 가정합니다.For example, consider a column defined as NVARCHAR(100) that stores 180 bytes of Japanese characters. 이 예에서 열 데이터는 현재 문자당 2바이트를 사용하는 UCS-2 또는 UTF-16을 사용하여 인코딩됩니다.In this example, the column data is currently encoded using UCS-2 or UTF-16, which uses 2 bytes per character. 새 데이터 형식은 200바이트만 저장할 수 있지만 일본어 문자는 UTF-8로 인코딩된 경우 3바이트가 필요하기 때문에 열 유형을 VARCHAR(200) 으로 변환하면 데이터가 잘릴 수 있습니다.Converting the column type to VARCHAR(200) is not enough to prevent data truncation, because the new data type can only store 200 bytes, but Japanese characters require 3 bytes when encoded in UTF-8. 따라서 데이터 잘림을 통한 데이터 손실을 방지하려면 열을 VARCHAR(270) 으로 정의해야 합니다.So the column must be defined as VARCHAR(270) to avoid data loss through data truncation.
따라서 기존 데이터를 UTF-8로 변환하기 전에 열 정의에 대한 예상 바이트 크기를 미리 파악하고 이에 따라 새 데이터 형식 크기를 조정해야 합니다.Therefore, it's required to know in advance what's the projected byte size for the column definition before converting existing data to UTF-8, and adjust the new data type size accordingly. DATALENGTH 함수 및 COLLATE 문을 사용하여 기존 데이터베이스에서 UTF-8 변환 작업에 대한 올바른 데이터 길이 요구 사항을 결정하는 데이터 샘플 GitHub에서 Transact-SQLTransact-SQL 스크립트 또는 SQL Notebook을 참조하세요.Refer to the Transact-SQLTransact-SQL script or the SQL Notebook in the Data Samples GitHub, which use the DATALENGTH function and the COLLATE statement to determine the correct data length requirements for UTF-8 conversion operations in an existing database.
기존 테이블에서 열 데이터 정렬 및 데이터 형식을 변경하려면 열 데이터 정렬 설정 또는 변경에 설명된 방법 중 하나를 사용합니다.To change the column collation and data type in an existing table, use one of the methods described in Set or Change the Column Collation.
데이터베이스 데이터 정렬을 변경하여 새 개체가 기본적으로 데이터베이스 데이터 정렬을 상속하도록 허용하거나 서버 데이터 정렬을 변경하여 새 데이터베이스가 기본적으로 시스템 데이터 정렬을 상속하도록 허용하려면 이 문서의 관련 작업 섹션을 참조하세요.To change the database collation, allowing new objects to inherit the database collation by default, or to change the server collation, allowing new databases to inherit the system collation by default, see the Related tasks section of this article.
Related tasksRelated tasks
TaskTask | 항목Topic |
---|---|
SQL Server 인스턴스의 데이터 정렬을 설정하거나 변경하는 방법에 대해 설명합니다.Describes how to set or change the collation of the instance of SQL Server. 서버 데이터 정렬을 변경해도 기존 사용자 데이터베이스의 데이터 정렬은 변경되지 않습니다.Note that changing the server collation does not change the collation of existing databases. | 서버 데이터 정렬 설정 또는 변경Set or Change the Server Collation |
사용자 데이터베이스의 데이터 정렬을 설정하거나 변경하는 방법에 대해 설명합니다.Describes how to set or change the collation of a user database. 데이터베이스 데이터 정렬을 변경해도 기존 테이블 열의 데이터 정렬은 변경되지 않습니다.Note that changing a database collation does not change the collation of existing table columns. | 데이터베이스 데이터 정렬 설정 또는 변경Set or Change the Database Collation |
데이터베이스 열의 데이터 정렬을 설정하거나 변경하는 방법을 설명합니다.Describes how to set or change the collation of a column in the database | 열 데이터 정렬 설정 또는 변경Set or Change the Column Collation |
서버, 데이터베이스 또는 열 수준에서 데이터 정렬 정보를 반환하는 방법을 설명합니다.Describes how to return collation information at the server, database, or column level | 데이터 정렬 정보 보기View Collation Information |
특정 언어에서 다른 언어로 이식성이 향상되고 여러 언어를 더욱 쉽게 지원하도록 Transact-SQL 문을 작성하는 방법을 설명합니다.Describes how to write Transact-SQL statements that are more portable from one language to another, or support multiple languages more easily | 국가별 Transact-SQL 문 작성Write International Transact-SQL Statements |
날짜, 시간, 통화 데이터가 사용 및 표시되는 방식에 대한 기본 설정과 오류 메시지 언어를 변경하는 방법을 설명합니다.Describes how to change the language of error messages and preferences for how date, time, and currency data is used and displayed | 세션 언어 설정Set a Session Language |
Related contentRelated content
자세한 내용은 다음 관련 콘텐츠를 참조하세요.For more information, see the following related content:
- SQL Server Best Practices Collation ChangeSQL Server Best Practices Collation Change
- 유니코드 문자 형식을 사용하여 데이터 가져오기 및 내보내기(SQL Server)Use Unicode Character Format to Import or Export Data (SQL Server)
- 국가별 Transact-SQL 문 작성Write International Transact-SQL Statements
- SQL Server 모범 사례 유니코드로 마이그레이션(더 이상 유지 관리되지 않음)SQL Server Best Practices Migration to Unicode (no longer maintained)
- 유니코드 컨소시엄Unicode Consortium
- 유니코드 표준Unicode Standard
- SQL Server용 OLE DB 드라이버에서 UTF-8 지원UTF-8 Support in OLE DB Driver for SQL Server
- SQL Server 데이터 정렬 이름(Transact-SQL)SQL Server Collation Name (Transact-SQL)
- Windows 데이터 정렬 이름(Transact-SQL)Windows Collation Name (Transact-SQL)
- Introducing UTF-8 support for SQL Server(SQL Server에 UTF-8 지원 도입)Introducing UTF-8 support for SQL Server
- COLLATE(Transact-SQL)COLLATE (Transact-SQL)
- 데이터 정렬 선행 규칙Collation Precedence
참고 항목See also
포함된 데이터베이스 데이터 정렬 Contained Database Collations
전체 텍스트 인덱스 생성 시 언어 선택 Choose a Language When Creating a Full-Text Index
sys.fn_helpcollations(Transact-SQL) sys.fn_helpcollations (Transact-SQL)
싱글바이트 및 멀티바이트 문자 집합Single-Byte and Multibyte Character Sets