<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="retrieving-data">
      </a>
      5.3.4 Retrieving Information from a Table
     </h3>
    </div>
   </div>
  </div>
  <div class="toc">
   <dl class="toc">
    <dt>
     <span class="section">
      <a href="selecting-all.html">
       5.3.4.1 Selecting All Data
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="selecting-rows.html">
       5.3.4.2 Selecting Particular Rows
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="selecting-columns.html">
       5.3.4.3 Selecting Particular Columns
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="sorting-rows.html">
       5.3.4.4 Sorting Rows
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="date-calculations.html">
       5.3.4.5 Date Calculations
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="working-with-null.html">
       5.3.4.6 Working with NULL Values
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="pattern-matching.html">
       5.3.4.7 Pattern Matching
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="counting-rows.html">
       5.3.4.8 Counting Rows
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="multiple-tables.html">
       5.3.4.9 Using More Than one Table
      </a>
     </span>
    </dt>
   </dl>
  </div>
  <a class="indexterm" name="idm46045325305216">
  </a>
  <a class="indexterm" name="idm46045325303760">
  </a>
  <a class="indexterm" name="idm46045325302272">
  </a>
  <a class="indexterm" name="idm46045325300784">
  </a>
  <p>
   The
   <a class="link" href="select.html" title="15.2.13 SELECT Statement">
    <code class="literal">
     SELECT
    </code>
   </a>
   statement is used to
        pull information from a table. The general form of the statement
        is:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa85639393"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> <em class="replaceable">what_to_select</em>
<span class="token keyword">FROM</span> <em class="replaceable">which_table</em>
<span class="token keyword">WHERE</span> <em class="replaceable">conditions_to_satisfy</em><span class="token punctuation">;</span></code></pre>
  </div>
  <p>
   <em class="replaceable">
    <code>
     what_to_select
    </code>
   </em>
   indicates what you
        want to see. This can be a list of columns, or
   <code class="literal">
    *
   </code>
   to indicate
   <span class="quote">
    “
    <span class="quote">
     all columns.
    </span>
    ”
   </span>
   <em class="replaceable">
    <code>
     which_table
    </code>
   </em>
   indicates the table from
        which you want to retrieve data. The
   <code class="literal">
    WHERE
   </code>
   clause is optional. If it is present,
   <em class="replaceable">
    <code>
     conditions_to_satisfy
    </code>
   </em>
   specifies one
        or more conditions that rows must satisfy to qualify for
        retrieval.
  </p>
 </div>
 <br/>
</div>
