> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# execute

<div className="kinetica-doxygen">
  <div id="a961a30f3d43a87a41a07457207f8ff76" />

  <h2 className="memtitle"><span className="permalink"><a href="#a961a30f3d43a87a41a07457207f8ff76">◆ </a></span>execute() <span className="overload">\[1/5]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname">long gpudb::GPUdb::execute </td>
          <td>(</td>
          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">sql</span></span></td>
          <td>)</td>

          <td />
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>This method is used to execute a SQL statement (e.g., DML, DDL). </p>
      <p>It returns the number of rows affected by the statement.</p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramname">sql</td>
              <td>- The SQL query to execute</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd">- number of rows affected by the execution of statement </div>
      </div>
    </div>
  </div>

  <div id="a7042004951231af914a4abc3b0035beb" />

  <h2 className="memtitle"><span className="permalink"><a href="#a7042004951231af914a4abc3b0035beb">◆ </a></span>execute() <span className="overload">\[2/5]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname">long gpudb::GPUdb::execute </td>
          <td>(</td>
          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">sql</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">parameters</span></span> )</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>This method is used to execute a SQL statement (e.g., DML, DDL). </p>
      <p>It returns the number of rows affected by the statement.</p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramname">sql</td>
              <td>- The SQL query to execute </td>
            </tr>

            <tr>
              <td className="paramname">parameters</td>
              <td>- Query parameters for the SQL query. Can be empty.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd">- number of rows affected by the execution of statement </div>
      </div>
    </div>
  </div>

  <div id="af70fe59fbeb702506f92ea8c60f030f4" />

  <h2 className="memtitle"><span className="permalink"><a href="#af70fe59fbeb702506f92ea8c60f030f4">◆ </a></span>execute() <span className="overload">\[3/5]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname">long gpudb::GPUdb::execute </td>
          <td>(</td>
          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">sql</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">parameters</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::map\< std::string, std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">options</span></span> )</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>This method is used to execute a SQL statement (e.g., DML, DDL). </p>
      <p>It returns the number of rows affected by the statement.</p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramname">sql</td>
              <td>- The SQL query to execute </td>
            </tr>

            <tr>
              <td className="paramname">parameters</td>
              <td>- Query parameters for the SQL query. Can be empty. </td>
            </tr>

            <tr>
              <td className="paramname">options</td>
              <td>- Optional parameters for the execute call.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd">- number of rows affected by the execution of statement </div>
      </div>
    </div>
  </div>

  <div id="a4b4c16fda3705614a5ea037dff06c7eb" />

  <h2 className="memtitle"><span className="permalink"><a href="#a4b4c16fda3705614a5ea037dff06c7eb">◆ </a></span>execute() <span className="overload">\[4/5]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <div className="memtemplate"> template\<typename T> </div>

      <table className="memname">
        <tr>
          <td className="memname">long gpudb::GPUdb::execute </td>
          <td>(</td>
          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">sql</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::vector\< T > &</td>
          <td className="paramname"><span className="paramname"><span className="em">parameters</span></span> )</td>
        </tr>
      </table>
    </div>

    <div className="memdoc" />
  </div>

  <div id="a02bfe576a873f7e8d8d9cacc5dae9da0" />

  <h2 className="memtitle"><span className="permalink"><a href="#a02bfe576a873f7e8d8d9cacc5dae9da0">◆ </a></span>execute() <span className="overload">\[5/5]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <div className="memtemplate"> template\<typename T> </div>

      <table className="memname">
        <tr>
          <td className="memname">long gpudb::GPUdb::execute </td>
          <td>(</td>
          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">sql</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::vector\< T > &</td>
          <td className="paramname"><span className="paramname"><span className="em">parameters</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::map\< std::string, std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">options</span></span> )</td>
        </tr>
      </table>
    </div>

    <div className="memdoc" />
  </div>
</div>
