ibm-information-center/dist/eclipse/plugins/i5OS.ic.db2_5.4.0.1/rbafzmstch2char.htm

156 lines
7.3 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<?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 xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="dc.language" scheme="rfc1766" 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. -->
<meta name="dc.date" scheme="iso8601" content="2005-09-19" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
<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="keywords" content="characters, SQL (Structured Query Language)" />
<title>Characters</title>
<link rel="stylesheet" type="text/css" href="ibmidwb.css" />
<link rel="stylesheet" type="text/css" href="ic.css" />
</head>
<body>
<a id="Top_Of_Page" name="Top_Of_Page"></a><!-- Java sync-link -->
<script language = "Javascript" src = "../rzahg/synch.js" type="text/javascript"></script>
<a name="ch2char"></a>
<h2 id="ch2char"><a href="rbafzmst02.htm#ToC_81">Characters</a></h2><a id="idx224" name="idx224"></a>
<p>The basic symbols of keywords and operators in the SQL
language are single-byte characters<sup class="fn"><a href="rbafzmstch2char.htm#fn5">12</a></sup> that are part of all
character sets supported by the IBM&reg; relational database products. Characters
of the language are classified as letters, digits, or special characters.</p>
<p>A <span class="italic">letter</span> is any of the 26 uppercase (A through
Z) and 26 lowercase (a through z) letters of the English alphabet. <sup class="fn"><a id="wq60" name="wq60" href="rbafzmstch2char.htm#wq61">13</a></sup></p>
<p>A <span class="italic">digit</span> is any of the characters 0 through 9.</p>
<p>A <span class="italic">special character</span> is any of the characters listed
below: </p>
<a name="wq62"></a>
<table id="wq62" width="100%" summary="" border="0" frame="void" rules="none">
<tbody valign="top">
<tr>
<td width="7%" align="left" valign="top"></td>
<td width="43%" align="left" valign="top">space or blank</td>
<td width="9%" align="left" valign="top">-</td>
<td width="39%" align="left" valign="top">minus sign</td>
</tr>
<tr>
<td align="left" valign="top">"</td>
<td align="left" valign="top">quotation mark or double-quote or double
quotation mark</td>
<td align="left" valign="top">.</td>
<td align="left" valign="top">period</td>
</tr>
<tr>
<td align="left" valign="top">%</td>
<td align="left" valign="top">percent</td>
<td align="left" valign="top">/</td>
<td align="left" valign="top">slash</td>
</tr>
<tr>
<td align="left" valign="top">&amp;</td>
<td align="left" valign="top">ampersand</td>
<td align="left" valign="top">:</td>
<td align="left" valign="top">colon</td>
</tr>
<tr>
<td align="left" valign="top">'</td>
<td align="left" valign="top">apostrophe or single quote or single quotation
mark</td>
<td align="left" valign="top">;</td>
<td align="left" valign="top">semicolon</td>
</tr>
<tr>
<td align="left" valign="top">(</td>
<td align="left" valign="top">left parenthesis</td>
<td align="left" valign="top">&lt;</td>
<td align="left" valign="top">less than</td>
</tr>
<tr>
<td align="left" valign="top">)</td>
<td align="left" valign="top">right parenthesis</td>
<td align="left" valign="top">=</td>
<td align="left" valign="top">equals</td>
</tr>
<tr>
<td align="left" valign="top">*</td>
<td align="left" valign="top">asterisk</td>
<td align="left" valign="top">></td>
<td align="left" valign="top">greater than</td>
</tr>
<tr>
<td align="left" valign="top">+</td>
<td align="left" valign="top">plus sign</td>
<td align="left" valign="top">?</td>
<td align="left" valign="top">question mark</td>
</tr>
<tr>
<td align="left" valign="top">,</td>
<td align="left" valign="top">comma</td>
<td align="left" valign="top">_</td>
<td align="left" valign="top">underline or underscore</td>
</tr>
<tr>
<td align="left" valign="top"><span class="bold">|</span></td>
<td align="left" valign="top">vertical bar<sup class="fn"><a href="rbafzmstch2char.htm#vertic">15</a></sup></td>
<td align="left" valign="top"><span class="bold">^</span></td>
<td align="left" valign="top">caret</td>
</tr>
<tr>
<td align="left" valign="top"><span class="bold">!</span></td>
<td align="left" valign="top">exclamation mark<sup class="fn"><a href="rbafzmstch2char.htm#notexcl">14</a></sup></td>
<td align="left" valign="top"><span class="bold">[</span></td>
<td align="left" valign="top">left bracket</td>
</tr>
<tr>
<td align="left" valign="top"><span class="bold">{</span></td>
<td align="left" valign="top">left brace</td>
<td align="left" valign="top"><span class="bold">]</span></td>
<td align="left" valign="top">right bracket</td>
</tr>
<tr>
<td align="left" valign="top"><span class="bold">}</span></td>
<td align="left" valign="top">right brace</td>
<td align="left" valign="top">&not;</td>
<td align="left" valign="top">not <sup class="fn"><a href="rbafzmstch2char.htm#notexcl">14</a></sup></td>
</tr>
</tbody>
</table>
<hr /><div class="fnnum"><a id="fn5" name="fn5">12</a>.</div>
<div class="fntext">Note that if the SQL statement is encoded as Unicode
data, all characters of the statement except for string constants will be
converted to single-byte characters prior to processing. Tokens representing
string constants may be processed as UTF-16 graphic strings without conversion
to single-byte.</div><div class="fnnum"><a id="wq61" name="wq61" href="rbafzmstch2char.htm#wq60">13</a>.</div>
<div class="fntext">Letters
also include three code points reserved as alphabetic extenders for national
languages (#, @, and $ in the United States). These three code points should
be avoided because they represent different characters depending on the CCSID.</div><div class="fnnum"><a id="vertic" name="vertic">15</a>.</div>
<div class="fntext">Using the vertical bar (|) character might inhibit code portability
between IBM relational database products. It is preferable to use the CONCAT
operator instead of the concatenation operator (||). Use of the vertical bar
should be avoided because it is a variant character.</div><div class="fnnum"><a id="notexcl" name="notexcl">14</a>.</div>
<div class="fntext">Using the not symbol (&not;) and the exclamation
point symbol (!) might inhibit code portability between IBM relational database
products. Avoid using them because they are variant characters. Instead of &not;=
or != use &lt;>. Instead of &not;> or !> use &lt;=. Instead of &not;&lt;
or !&lt; use >=.</div>
<br />
<hr /><br />
[ <a href="#Top_Of_Page">Top of Page</a> | <a href="rbafzmstsqlelem.htm">Previous Page</a> | <a href="rbafzmstch2tok.htm">Next Page</a> | <a href="rbafzmst02.htm#wq1">Contents</a> |
<a href="rbafzmstindex.htm#index">Index</a> ]
<a id="Bot_Of_Page" name="Bot_Of_Page"></a>
</body>
</html>