<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.ibm-db2.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'function.db2-columns.php',
    1 => 'db2_columns',
    2 => 'Returns a result set listing the columns and associated metadata for a table',
  ),
  'up' => 
  array (
    0 => 'ref.ibm-db2.php',
    1 => 'Функції IBM DB2',
  ),
  'prev' => 
  array (
    0 => 'function.db2-column-privileges.php',
    1 => 'db2_column_privileges',
  ),
  'next' => 
  array (
    0 => 'function.db2-commit.php',
    1 => 'db2_commit',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/ibm_db2/functions/db2-columns.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.db2-columns" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">db2_columns</h1>
  <p class="verinfo">(PECL ibm_db2 &gt;= 1.0.0)</p><p class="refpurpose"><span class="refname">db2_columns</span> &mdash; <span class="dc-title">
   Returns a result set listing the columns and associated metadata for a table
  </span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.db2-columns-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>db2_columns</strong></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> <code class="parameter">$connection</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$qualifier</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$schema</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$table_name</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$column_name</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span><br>): <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span></div>


  <p class="para rdfs-comment">
   Returns a result set listing the columns and associated metadata for a
   table.
  </p>

 </div>

 <div class="refsect1 parameters" id="refsect1-function.db2-columns-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">connection</code></dt>
     <dd>
      <p class="para">
       A valid connection to an IBM DB2, Cloudscape, or Apache Derby database.
      </p>
     </dd>
    
    
    <dt><code class="parameter">qualifier</code></dt>
     <dd>
      <p class="para">
       A qualifier for DB2 databases running on OS/390 or z/OS servers. For
       other databases, pass <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> or an empty string.
      </p>
     </dd>
    
    
     <dt><code class="parameter">schema</code></dt>
     <dd>
      <p class="para">
       The schema which contains the tables. To match all schemas, pass
       <code class="literal">&#039;%&#039;</code>.
      </p>
     </dd>
    
    
     <dt><code class="parameter">table_name</code></dt>
     <dd>
      <p class="para">
       The name of the table or view. To match all tables in the database,
       pass <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> or an empty string.
      </p>
     </dd>
    
    
     <dt><code class="parameter">column_name</code></dt>
     <dd>
      <p class="para">
       The name of the column. To match all columns in the table, pass <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>
       or an empty string.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.db2-columns-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   Returns a statement resource with a result set containing rows describing
   the columns matching the specified parameters. The rows are composed of
   the following columns:
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Column name</th>
       <th>Description</th>
      </tr>

     </thead>

     <tbody class="tbody">
       <tr>
        <td>TABLE_CAT</td>
        <td>Name of the catalog. The value is NULL if this table does not
         have catalogs.</td>
       </tr>

       <tr>
        <td>TABLE_SCHEM</td>
        <td>Name of the schema.</td>
       </tr>

       <tr>
        <td>TABLE_NAME</td>
        <td>Name of the table or view.</td>
       </tr>

       <tr>
        <td>COLUMN_NAME</td>
        <td>Name of the column.</td>
       </tr>

       <tr>
        <td>DATA_TYPE</td>
        <td>The SQL data type for the column represented as an integer value.</td>
       </tr>

       <tr>
        <td>TYPE_NAME</td>
        <td>A string representing the data type for the column.</td>
       </tr>

       <tr>
        <td>COLUMN_SIZE</td>
        <td>An integer value representing the size of the column.</td>
       </tr>

       <tr>
        <td>BUFFER_LENGTH</td>
        <td>
         Maximum number of bytes necessary to store data from this column.
        </td>
       </tr>

       <tr>
        <td>DECIMAL_DIGITS</td>
        <td>
         The scale of the column, or <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> where scale is not applicable.
        </td>
       </tr>

       <tr>
        <td>NUM_PREC_RADIX</td>
        <td>
         An integer value of either <code class="literal">10</code> (representing
         an exact numeric data type), <code class="literal">2</code> (representing an
         approximate numeric data type), or <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> (representing a data type for
         which radix is not applicable).
        </td>
       </tr>

       <tr>
        <td>NULLABLE</td>
        <td>An integer value representing whether the column is nullable or
        not.</td>
       </tr>

       <tr>
        <td>REMARKS</td>
        <td>Description of the column.</td>
       </tr>

       <tr>
        <td>COLUMN_DEF</td>
        <td>Default value for the column.</td>
       </tr>

       <tr>
        <td>SQL_DATA_TYPE</td>
        <td>An integer value representing the size of the column.</td>
       </tr>

       <tr>
        <td>SQL_DATETIME_SUB</td>
        <td>
         Returns an integer value representing a datetime subtype code,
         or <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> for SQL data types to which this does not apply.
        </td>
       </tr>

       <tr>
        <td>CHAR_OCTET_LENGTH</td>
        <td>
         Maximum length in octets for a character data type column, which
         matches COLUMN_SIZE for single-byte character set data, or <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> for
         non-character data types.
        </td>
       </tr>

       <tr>
        <td>ORDINAL_POSITION</td>
        <td>The 1-indexed position of the column in the table.</td>
       </tr>

       <tr>
        <td>IS_NULLABLE</td>
        <td>
         A string value where &#039;YES&#039; means that the column is nullable and
         &#039;NO&#039; means that the column is not nullable.
       </td>
       </tr>

     </tbody>
    
   </table>


  </p>
 </div>


 

 <div class="refsect1 seealso" id="refsect1-function.db2-columns-seealso">
  <h3 class="title">Прогляньте також</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.db2-column-privileges.php" class="function" rel="rdfs-seeAlso">db2_column_privileges()</a> - Returns a result set listing the columns and associated privileges for a table</span></li>
    <li><span class="function"><a href="function.db2-foreign-keys.php" class="function" rel="rdfs-seeAlso">db2_foreign_keys()</a> - Returns a result set listing the foreign keys for a table</span></li>
    <li><span class="function"><a href="function.db2-primary-keys.php" class="function" rel="rdfs-seeAlso">db2_primary_keys()</a> - Returns a result set listing primary keys for a table</span></li>
    <li><span class="function"><a href="function.db2-procedure-columns.php" class="function" rel="rdfs-seeAlso">db2_procedure_columns()</a> - Returns a result set listing stored procedure parameters</span></li>
    <li><span class="function"><a href="function.db2-procedures.php" class="function" rel="rdfs-seeAlso">db2_procedures()</a> - Returns a result set listing the stored procedures registered in a database</span></li>
    <li><span class="function"><a href="function.db2-special-columns.php" class="function" rel="rdfs-seeAlso">db2_special_columns()</a> - Returns a result set listing the unique row identifier columns for a table</span></li>
    <li><span class="function"><a href="function.db2-statistics.php" class="function" rel="rdfs-seeAlso">db2_statistics()</a> - Returns a result set listing the index and statistics for a table</span></li>
    <li><span class="function"><a href="function.db2-table-privileges.php" class="function" rel="rdfs-seeAlso">db2_table_privileges()</a> - Returns a result set listing the tables and associated privileges in a database</span></li>
    <li><span class="function"><a href="function.db2-tables.php" class="function" rel="rdfs-seeAlso">db2_tables()</a> - Returns a result set listing the tables and associated metadata in a database</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>