📄 function.db2-special-columns.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Returns a result set listing the unique row identifier columns for a table</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.db2-set-option.html">db2_set_option</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.db2-statistics.html">db2_statistics</a></div> <div class="up"><a href="ref.ibm-db2.html">IBM DB2 Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.db2-special-columns" class="refentry"> <div class="refnamediv"> <h1 class="refname">db2_special_columns</h1> <p class="verinfo">(PECL ibm_db2:1.0-1.6.2)</p><p class="refpurpose"><span class="refname">db2_special_columns</span> — <span class="dc-title"> Returns a result set listing the unique row identifier columns for a table </span></p> </div> <div class="refsect1 description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">resource</span> <span class="methodname"><b><b>db2_special_columns</b></b></span> ( <span class="methodparam"><span class="type">resource</span> <tt class="parameter">$connection</tt></span> , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$qualifier</tt></span> , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$schema</tt></span> , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$table_name</tt></span> , <span class="methodparam"><span class="type">int</span> <tt class="parameter">$scope</tt></span> )</div> <p class="para rdfs-comment"> Returns a result set listing the unique row identifier columns for a table. </p> </div> <div class="refsect1 parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><i><tt class="parameter">connection</tt></i></span> <dd> <p class="para"> A valid connection to an IBM DB2, Cloudscape, or Apache Derby database. </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">qualifier</tt></i></span> <dd> <p class="para"> A qualifier for DB2 databases running on OS/390 or z/OS servers. For other databases, pass <b><tt>NULL</tt></b> or an empty string. </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">schema</tt></i></span> <dd> <p class="para"> The schema which contains the tables. </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">table_name</tt></i></span> <dd> <p class="para"> The name of the table. </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">scope</tt></i></span> <dd> <p class="para"> Integer value representing the minimum duration for which the unique row identifier is valid. This can be one of the following values: <table class="informaltable"> <colgroup> <thead valign="middle"> <tr valign="middle"> <th colspan="1">Integer value</th> <th colspan="1">SQL constant</th> <th colspan="1">Description</th> </tr> </thead> <tbody valign="middle" class="tbody"> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">0</td> <td colspan="1" rowspan="1" align="left">SQL_SCOPE_CURROW</td> <td colspan="1" rowspan="1" align="left">Row identifier is valid only while the cursor is positioned on the row.</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">1</td> <td colspan="1" rowspan="1" align="left">SQL_SCOPE_TRANSACTION</td> <td colspan="1" rowspan="1" align="left">Row identifier is valid for the duration of the transaction.</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">2</td> <td colspan="1" rowspan="1" align="left">SQL_SCOPE_SESSION</td> <td colspan="1" rowspan="1" align="left">Row identifier is valid for the duration of the connection.</td> </tr> </tbody> </colgroup> </table> </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns a statement resource with a result set containing rows with unique row identifier information for a table. The rows are composed of the following columns: <table class="informaltable"> <colgroup> <thead valign="middle"> <tr valign="middle"> <th colspan="1">Column name</th> <th colspan="1">Description</th> </tr> </thead> <tbody valign="middle" class="tbody"> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">SCOPE</td> <td colspan="1" rowspan="1" align="left"> <p class="para"> <table class="informaltable"> <colgroup> <thead valign="middle"> <tr valign="middle"> <th colspan="1">Integer value</th> <th colspan="1">SQL constant</th> <th colspan="1">Description</th> </tr> </thead> <tbody valign="middle" class="tbody"> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">0</td> <td colspan="1" rowspan="1" align="left">SQL_SCOPE_CURROW</td> <td colspan="1" rowspan="1" align="left">Row identifier is valid only while the cursor is positioned on the row.</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">1</td> <td colspan="1" rowspan="1" align="left">SQL_SCOPE_TRANSACTION</td> <td colspan="1" rowspan="1" align="left">Row identifier is valid for the duration of the transaction.</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">2</td> <td colspan="1" rowspan="1" align="left">SQL_SCOPE_SESSION</td> <td colspan="1" rowspan="1" align="left">Row identifier is valid for the duration of the connection.</td> </tr> </tbody> </colgroup> </table> </p> </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">COLUMN_NAME</td> <td colspan="1" rowspan="1" align="left">Name of the unique column.</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">DATA_TYPE</td> <td colspan="1" rowspan="1" align="left">SQL data type for the column.</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">TYPE_NAME</td> <td colspan="1" rowspan="1" align="left">Character string representation of the SQL data type for the column.</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">COLUMN_SIZE</td> <td colspan="1" rowspan="1" align="left">An integer value representing the size of the column.</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">BUFFER_LENGTH</td> <td colspan="1" rowspan="1" align="left"> Maximum number of bytes necessary to store data from this column. </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">DECIMAL_DIGITS</td> <td colspan="1" rowspan="1" align="left"> The scale of the column, or <b><tt>NULL</tt></b> where scale is not applicable. </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">NUM_PREC_RADIX</td> <td colspan="1" rowspan="1" align="left"> An integer value of either <i>10</i> (representing an exact numeric data type), <i>2</i> (representing an approximate numeric data type), or <b><tt>NULL</tt></b> (representing a data type for which radix is not applicable). </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">PSEUDO_COLUMN</td> <td colspan="1" rowspan="1" align="left">Always returns 1.</td> </tr> </tbody> </colgroup> </table> </p> </div> <div class="refsect1 seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"><a href="function.db2-column-privileges.html" class="function" rel="rdfs-seeAlso">db2_column_privileges()</a></li> <li class="member"><a href="function.db2-columns.html" class="function" rel="rdfs-seeAlso">db2_columns()</a></li> <li class="member"><a href="function.db2-foreign-keys.html" class="function" rel="rdfs-seeAlso">db2_foreign_keys()</a></li> <li class="member"><a href="function.db2-primary-keys.html" class="function" rel="rdfs-seeAlso">db2_primary_keys()</a></li> <li class="member"><a href="function.db2-procedure-columns.html" class="function" rel="rdfs-seeAlso">db2_procedure_columns()</a></li> <li class="member"><a href="function.db2-procedures.html" class="function" rel="rdfs-seeAlso">db2_procedures()</a></li> <li class="member"><a href="function.db2-statistics.html" class="function" rel="rdfs-seeAlso">db2_statistics()</a></li> <li class="member"><a href="function.db2-table-privileges.html" class="function" rel="rdfs-seeAlso">db2_table_privileges()</a></li> <li class="member"><a href="function.db2-tables.html" class="function" rel="rdfs-seeAlso">db2_tables()</a></li> </ul> </p> </div></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.db2-set-option.html">db2_set_option</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.db2-statistics.html">db2_statistics</a></div> <div class="up"><a href="ref.ibm-db2.html">IBM DB2 Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -