> ## 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.

# executeSqlRaw

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

  <h2 className="memtitle"><span className="permalink"><a href="#a0467a00f7a623da381265796b580e7ce">◆ </a></span>executeSqlRaw() <span className="overload">\[1/2]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1RawExecuteSqlResponse">RawExecuteSqlResponse</a> gpudb::GPUdb::executeSqlRaw </td>
          <td>(</td>
          <td className="paramtype">const <a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteSqlRequest">ExecuteSqlRequest</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">request\_</span></span></td>
          <td>)</td>
          <td> const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Execute a SQL statement (query, DML, or DDL). </p>
      <p>See <a href="/content/sql/" target="_top">SQL Support</a> for the complete set of supported SQL commands.</p>
      <p>When a caller wants all the results from a large query (e.g., more than <a href="/content/config/#config-main-general" target="_top">max\_get\_records\_size</a> records), they can make multiple calls to this endpoint using the <a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteSqlRequest#a8028935e70224cefd72f7fa79b0ef7de">offset</a> and <a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteSqlRequest#a3613f778b8f80448019e49f740ef09af">limit</a> parameters to page through the results. Normally, this will execute the <a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteSqlRequest#ad8b660473874fb465d1c69677edc191c">statement</a> query each time. To avoid re-executing the query each time and to keep the results in the same order, the caller should specify a <a className="el" href="/content/api/cpp/namespacegpudb#a1cf02bf6e63569a04fd02f393fc3d8a5">paging\_table</a> name to hold the results of the query between calls and specify the <a className="el" href="/content/api/cpp/namespacegpudb#a1cf02bf6e63569a04fd02f393fc3d8a5">paging\_table</a> on subsequent calls. When this is done, the caller should clear the paging table and any other tables in the <a className="el" href="/content/api/cpp/namespacegpudb#a25ba4b49d3155936653a0dd22d27ff18">result\_table\_list</a> (both returned in the response) when they are done paging through the results. <a className="el" href="/content/api/cpp/structgpudb_1_1RawExecuteSqlResponse#a7513cc3b1e3c45335088094e006cdd32">pagingTable</a> (and <a className="el" href="/content/api/cpp/namespacegpudb#a25ba4b49d3155936653a0dd22d27ff18">result\_table\_list</a>) will be empty if no paging table was created (e.g., when all the query results were returned in the first call).</p>

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

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">request\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteSqlRequest">Request</a> object containing the parameters for the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1RawExecuteSqlResponse">Response</a> object containing the result of the operation. </div>
      </div>
    </div>
  </div>

  <div id="a0b1e04620afea4b5b3b0ce3eea517a55" />

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

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1RawExecuteSqlResponse">RawExecuteSqlResponse</a> & gpudb::GPUdb::executeSqlRaw </td>
          <td>(</td>
          <td className="paramtype">const <a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteSqlRequest">ExecuteSqlRequest</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">request\_</span></span>, </td>
        </tr>

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

          <td />

          <td className="paramtype"><a className="el" href="/content/api/cpp/structgpudb_1_1RawExecuteSqlResponse">RawExecuteSqlResponse</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">response\_</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Execute a SQL statement (query, DML, or DDL). </p>
      <p>See <a href="/content/sql/" target="_top">SQL Support</a> for the complete set of supported SQL commands.</p>
      <p>When a caller wants all the results from a large query (e.g., more than <a href="/content/config/#config-main-general" target="_top">max\_get\_records\_size</a> records), they can make multiple calls to this endpoint using the <a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteSqlRequest#a8028935e70224cefd72f7fa79b0ef7de">offset</a> and <a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteSqlRequest#a3613f778b8f80448019e49f740ef09af">limit</a> parameters to page through the results. Normally, this will execute the <a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteSqlRequest#ad8b660473874fb465d1c69677edc191c">statement</a> query each time. To avoid re-executing the query each time and to keep the results in the same order, the caller should specify a <a className="el" href="/content/api/cpp/namespacegpudb#a1cf02bf6e63569a04fd02f393fc3d8a5">paging\_table</a> name to hold the results of the query between calls and specify the <a className="el" href="/content/api/cpp/namespacegpudb#a1cf02bf6e63569a04fd02f393fc3d8a5">paging\_table</a> on subsequent calls. When this is done, the caller should clear the paging table and any other tables in the <a className="el" href="/content/api/cpp/namespacegpudb#a25ba4b49d3155936653a0dd22d27ff18">result\_table\_list</a> (both returned in the response) when they are done paging through the results. <a className="el" href="/content/api/cpp/structgpudb_1_1RawExecuteSqlResponse#a7513cc3b1e3c45335088094e006cdd32">pagingTable</a> (and <a className="el" href="/content/api/cpp/namespacegpudb#a25ba4b49d3155936653a0dd22d27ff18">result\_table\_list</a>) will be empty if no paging table was created (e.g., when all the query results were returned in the first call).</p>

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

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">request\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteSqlRequest">Request</a> object containing the parameters for the operation. </td>
            </tr>

            <tr>
              <td className="paramdir">\[out]</td>
              <td className="paramname">response\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1RawExecuteSqlResponse">Response</a> object containing the results of the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1RawExecuteSqlResponse">Response</a> object containing the result of the operation (initially passed in by reference). </div>
      </div>
    </div>
  </div>
</div>
