99 lines
8.0 KiB
HTML
99 lines
8.0 KiB
HTML
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<!DOCTYPE html
|
||
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html lang="en-us" xml:lang="en-us">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
<meta name="security" content="public" />
|
||
|
<meta name="Robots" content="index,follow" />
|
||
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
||
|
<meta name="DC.Type" content="concept" />
|
||
|
<meta name="DC.Title" content="Sort sequences and normalization in SQL" />
|
||
|
<meta name="abstract" content="A sort sequence defines how characters in a character set relate to each other when they are compared or ordered. Normalization allows you to compare strings that contain combining characters." />
|
||
|
<meta name="description" content="A sort sequence defines how characters in a character set relate to each other when they are compared or ordered. Normalization allows you to compare strings that contain combining characters." />
|
||
|
<meta name="DC.subject" content="sort sequence, using" />
|
||
|
<meta name="keywords" content="sort sequence, using" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafykickoff.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafyssorder.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafyssviews.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafyssindex.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafyssconstraints.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafyicu.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafynormal.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafyviewnt.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafycrtindx.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafywhere.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafygroup.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafyhaving.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafyorderby.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafydupl.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafycomsrch.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafykeyu.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="../db2/rbafzmstsortsequence.htm" />
|
||
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
|
||
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
|
||
|
<meta name="DC.Format" content="XHTML" />
|
||
|
<meta name="DC.Identifier" content="rbafyussisql" />
|
||
|
<meta name="DC.Language" content="en-us" />
|
||
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
||
|
<!-- US Government Users Restricted Rights -->
|
||
|
<!-- Use, duplication or disclosure restricted by -->
|
||
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
||
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
||
|
<title>Sort sequences and normalization in SQL</title>
|
||
|
</head>
|
||
|
<body id="rbafyussisql"><a name="rbafyussisql"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Sort sequences and normalization in SQL</h1>
|
||
|
<div><p>A sort sequence defines how characters in a character set relate
|
||
|
to each other when they are compared or ordered. Normalization allows you
|
||
|
to compare strings that contain combining characters.</p>
|
||
|
<p> The sort sequence is used for all character, and UCS-2 and UTF-16 graphic
|
||
|
comparisons performed in SQL statements. There are sort sequence tables for
|
||
|
both single byte and double byte character data. Each single byte sort sequence
|
||
|
table has an associated double byte sort sequence table, and vice versa. Conversion
|
||
|
between the two tables is performed when necessary to implement a query. In
|
||
|
addition, the CREATE INDEX statement has the sort sequence (in effect at the
|
||
|
time the statement was run) applied to the character columns referred to in
|
||
|
the index.</p>
|
||
|
</div>
|
||
|
<div>
|
||
|
<ul class="ullinks">
|
||
|
<li class="ulchildlink"><strong><a href="rbafyssorder.htm">Sort sequence used with ORDER BY and row selection</a></strong><br />
|
||
|
To see how to use a sort sequence, run the examples against the STAFF table shown in this topic.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rbafyssviews.htm">Sort sequence and views</a></strong><br />
|
||
|
Views are created with the sort sequence that was in effect when the CREATE VIEW statement was run.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rbafyssindex.htm">Sort sequence and the CREATE INDEX statement</a></strong><br />
|
||
|
Indexes are created using the sort sequence that was in effect when the CREATE INDEX statement was run.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rbafyssconstraints.htm">Sort sequence and constraints</a></strong><br />
|
||
|
Unique constraints are implemented with indexes. If the table on which a unique constraint is added was defined with a sort sequence, the index will be created with that same sort sequence.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rbafyicu.htm">ICU sort sequence</a></strong><br />
|
||
|
<span>When an ICU (International Components
|
||
|
for Unicode) sort sequence table is used, the database uses the system's ICU
|
||
|
support (Option 39) to determine the weight of the data according to language-specific
|
||
|
rules specified by to the locale of the table.</span></li>
|
||
|
<li class="ulchildlink"><strong><a href="rbafynormal.htm">Normalization</a></strong><br />
|
||
|
Normalization allows you to compare strings that contain combining characters.</li>
|
||
|
</ul>
|
||
|
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafykickoff.htm" title="These topics describe the iSeries server implementation of the Structured Query Language (SQL) using DB2 UDB for iSeries and the DB2 UDB Query Manager and SQL Development Kit Version 5 licensed program.">SQL programming</a></div>
|
||
|
</div>
|
||
|
<div class="relref"><strong>Related reference</strong><br />
|
||
|
<div><a href="rbafyviewnt.htm" title="A view can be used to access data in one or more tables or views. You create a view by using a SELECT statement.">Create and use views</a></div>
|
||
|
<div><a href="rbafycrtindx.htm" title="You can use indexes to sort and select data. In addition, indexes help the system retrieve data faster for better query performance.">Add indexes</a></div>
|
||
|
<div><a href="rbafywhere.htm" title="The WHERE clause specifies a search condition that identifies the row or rows you want to retrieve, update, or delete.">Specify a search condition using the WHERE clause</a></div>
|
||
|
<div><a href="rbafygroup.htm" title="The GROUP BY clause allows you to find the characteristics of groups of rows rather than individual rows.">GROUP BY clause</a></div>
|
||
|
<div><a href="rbafyhaving.htm" title="The HAVING clause specifies a search condition for the groups selected by GROUP BY clause.">HAVING clause</a></div>
|
||
|
<div><a href="rbafyorderby.htm" title="The ORDER BY clause specifies the particular order in which you want selected rows returned. The order is sorted by ascending or descending collating sequence of a column's or expression's value.">ORDER BY clause</a></div>
|
||
|
<div><a href="rbafydupl.htm" title="When SQL evaluates a select-statement, several rows might qualify to be in the result table, depending on the number of rows that satisfy the select-statement's search condition. Some of the rows in the result table might be duplicates.">Handle duplicate rows</a></div>
|
||
|
<div><a href="rbafycomsrch.htm" title="In addition to the basic comparison predicates (=, >, <, and so on), a search condition can contain any of the predicates BETWEEN, IN, EXISTS, IS NULL, and LIKE.">Define complex search conditions</a></div>
|
||
|
<div><a href="rbafykeyu.htm" title="Using the UNION keyword, you can combine two or more subselects to form a fullselect.">Use UNION keyword to combine subselects</a></div>
|
||
|
</div>
|
||
|
<div class="relinfo"><strong>Related information</strong><br />
|
||
|
<div><a href="../db2/rbafzmstsortsequence.htm">Sort Sequence</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|