⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 oracle.jdbc.driver.oraclestatement.html

📁 Oracle JDBC 的javaDoc
💻 HTML
📖 第 1 页 / 共 3 页
字号:
  <dd> Execute an update statement.<p>  <dd><dl>    <dt> <b>Parameters:</b>    <dd> sqlSQL - statement to be executed.  The query is transformedinto native SQL.    <dt> <b>Returns:</b>    <dd> the resulting update count.    <dt> <b>Throws:</b> SQLException    <dd> if error(s) occurred.  </dl></dd></dl><a name="execute(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="execute"><b>execute</b></a><pre> public synchronized boolean execute(String sql) throws SQLException</pre><dl>  <dd> Execute a SQL statement.<p>  <dd><dl>    <dt> <b>Parameters:</b>    <dd> sqlSQL - statement to be executed.    <dt> <b>Throws:</b> SQLException    <dd> if error(s) occurred.  </dl></dd></dl><a name="clearDefines()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="clearDefines"><b>clearDefines</b></a><pre> public synchronized void clearDefines() throws SQLException</pre><dl>  <dd> Allows the user to clear previously defined types forthe define-columns of a select statement.<p>This is useful if the user wishes to re-use a statementfor a different query. <p>After calling clearDefines, the user can either performdefines by calling defineColumnType or let the driveruse the default defines for the table.<p>To use the <code>setDefaultRowPrefetch</code> entrypoint you have tocast the Statement object to the type <code>oracle.jdbc.driver.OracleStatement</code>.<p><p></dl><a name="defineColumnType(int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="defineColumnType"><b>defineColumnType</b></a><pre> public synchronized void defineColumnType(int column_index,                                           int type) throws SQLException</pre><dl>  <dd> Define the type under which you will fetch data from the column. <br>Before executing a Query you may choose to inform JDBC of thetype you will use for fetching data from columns.  This will save2 roundtrips to the RDBMS when executing the query as otherwise the JDBC driver has to ask the RDBMS for the column types.<p>If you decide to define column types you have to declare thetypes of exactly all columns in the Query.  If definition aremissing or too many definitions are provided executeQuery willfail with a SQLException.<p>To use the <code>defineColumnType</code> entrypoint you have tocast the Statement object to the type<code>oracle.jdbc.driver.OracleStatement</code>.<p><ul>Notes:<li> When reading the value of an out parameter you don't have to use the getXXX method whose Java type XXX corresponds to theparameter's registered SQL type.  It's just faster if you do as the data has already been converted to the right type.</ul><p>  <dd><dl>    <dt> <b>Parameters:</b>    <dd> column_index - Index of column    <dd> type - Type to be assigned to columnThis type could be different from the native type of the column. Appropriate conversions will be done.  </dl></dd></dl><a name="defineColumnType(int, int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="defineColumnType"><b>defineColumnType</b></a><pre> public synchronized void defineColumnType(int column_index,                                           int type,                                           int max_size) throws SQLException</pre><dl>  <dd> Define the type under which you will fetch data from the columnand the maximum size of data you want.  <br>Similarly to the previous <code>void defineColumnType (int column_index,int type)</code>  before executing a Query you may choose to inform JDBC of the type you will use for fetching data from columns and the maximum length of data you desire. Each type of data has a defaultmaximum length. This API is useful if you do not wish to get thefull default length of data. The actual maximum length of data returnedwill be the minimum of the following values:<ul><li> maximum size passed in to this "define" method<li> the maximum field size that can be set by the JDBC API"setMaxFieldSize (int).<li> the "natural" maximum size of the data based on its type.</ul>If you decide to define column types you have to declare thetypes of exactly all columns in the Query. Any of the 2 "define" API can be used for any column. If definitions aremissing or too many definitions are provided executeQuery willfail with a SQLException.<p>Similar to the other "define" API, to use the <code>defineColumnType</code> entrypoint you have tocast the Statement object to the type<code>oracle.jdbc.driver.OracleStatement</code>.<p><ul>The same conditions as for the other 'define" API apply here:<li> When reading the value of an out parameter you don't have to use the getXXX method whose Java type XXX corresponds to theparameter's registered SQL type.  It's just faster if you do as the data has already been converted to the right type.</ul>The actual maximum length of data returnedwill be the minimum of the following values:<ul><li> maximum size passed in to this "define" method<li> the maximum field size that can be set by the JDBC API"setMaxFieldSize (int).<li> the "natural" maximum size of the data based on its type.</ul><p><p>  <dd><dl>    <dt> <b>Parameters:</b>    <dd> column_index - Index of column    <dd> type - Type to be assigned to columnThis type could be different from the native type of the column. Appropriate conversions will be done.    <dd> max_size - Maximum length of data that the userwants for this column.  </dl></dd></dl><a name="defineColumnType(int, int, java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="defineColumnType"><b>defineColumnType</b></a><pre> public synchronized void defineColumnType(int column_index,                                           int typeCode,                                           String typeName) throws SQLException</pre><dl>  <dd> Define the type under which you will fetch data from the column. <br>Before executing a Query you may choose to inform JDBC of thetype you will use for fetching data from columns.  This will save2 roundtrips to the RDBMS when executing the query as otherwise the JDBC driver has to ask the RDBMS for the column types.<p>If you decide to define column types you have to declare thetypes of exactly all columns in the Query.  If definition aremissing or too many definitions are provided executeQuery willfail with a SQLException.<p>To use the <code>defineColumnType</code> entrypoint you have tocast the Statement object to the type<code>oracle.jdbc.driver.OracleStatement</code>.<p><ul>Notes:<li> When reading the value of an out parameter you don't have to use the getXXX method whose Java type XXX corresponds to theparameter's registered SQL type.  It's just faster if you do as the data has already been converted to the right type.</ul><p>  <dd><dl>    <dt> <b>Parameters:</b>    <dd> column_index - Index of column    <dd> type - Type to be assigned to columnThis type could be different from the native type of the column. Appropriate conversions will be done.    <dd> typeName - specifies the fully-qualified name of thecolumn if typeCode is OracleTypes.REF_TYPE or OracleTypes.STRUCT or OracleTypes.ARRAY.This parameter is ignored for other type codes.    <dd> max_size - Maximum length of data that the userwants for this column.  </dl></dd></dl><a name="setRowPrefetch(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setRowPrefetch"><b>setRowPrefetch</b></a><pre> public synchronized void setRowPrefetch(int value) throws SQLException</pre><dl>  <dd> setRowPrefetch allows the user to set the row prefetch valuefor all result sets created from this statement.<p>setRowPrefetch overrides the prefetch value set from theconnection, for this particular statement.<p>The row_prefetch will be turned back to 1 automaticallyby the driver if any of the select-column types isstreaming (long data or long raw data). This is overridesany value the user might set. Also, this will be done regardlessof wether the streaming columns are read or not. <p>To use the <code>setDefaultRowPrefetch</code> entrypoint you have tocast the Statement object to the type <code>oracle.jdbc.driver.OracleStatement</code>.<p><p></dl><a name="getRowPrefetch()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getRowPrefetch"><b>getRowPrefetch</b></a><pre> public synchronized int getRowPrefetch()</pre><dl>  <dd> Allows the user to retrieve the prefetch value for all resultssets created from this statement. <p>To use the <code>setDefaultRowPrefetch</code> entrypoint you have tocast the Statement object to the type <code>oracle.jdbc.driver.OracleStatement</code>.<p><p></dl><a name="getMaxFieldSize()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getMaxFieldSize"><b>getMaxFieldSize</b></a><pre> public synchronized int getMaxFieldSize() throws SQLException</pre><a name="setMaxFieldSize(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setMaxFieldSize"><b>setMaxFieldSize</b></a><pre> public synchronized void setMaxFieldSize(int max) throws SQLException</pre><a name="getMaxRows()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getMaxRows"><b>getMaxRows</b></a><pre> public int getMaxRows() throws SQLException</pre><a name="setMaxRows(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setMaxRows"><b>setMaxRows</b></a><pre> public synchronized void setMaxRows(int max) throws SQLException</pre><a name="setEscapeProcessing(boolean)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setEscapeProcessing"><b>setEscapeProcessing</b></a><pre> public synchronized void setEscapeProcessing(boolean enable) throws SQLException</pre><a name="getQueryTimeout()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getQueryTimeout"><b>getQueryTimeout</b></a><pre> public synchronized int getQueryTimeout() throws SQLException</pre><dl>  <dd> The queryTimeout limit is the number of seconds the driver willwait for a Statement to execute. If the limit is exceeded, aSQLException is thrown.<p>  <dd><dl>    <dt> <b>Returns:</b>    <dd> the current query timeout limit in seconds; zero means unlimited  </dl></dd></dl><a name="setQueryTimeout(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setQueryTimeout"><b>setQueryTimeout</b></a><pre> public synchronized void setQueryTimeout(int max) throws SQLException</pre><dl>  <dd> The queryTimeout limit is the number of seconds the driver willwait for a Statement to execute. If the limit is exceeded, aSQLException is thrown.<p>  <dd><dl>    <dt> <b>Parameters:</b>    <dd> seconds - the new query timeout limit in seconds; zero means unlimited  </dl></dd></dl><a name="cancel()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="cancel"><b>cancel</b></a><pre> public void cancel() throws SQLException</pre><dl>  <dd> Cancel the current statement<p></dl><a name="setAutoRollback(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setAutoRollback"><b>setAutoRollback</b></a><pre> public synchronized void setAutoRollback(int autoRollback) throws SQLException</pre><dl><dd><b> Note: setAutoRollback() is deprecated.</b><i>As of JDBC 8.1.6.  No Replacement.933355: Transaction management, if different from the default behavior, should be handled by the user at the application level.if autoRollback is 0, then non fatal errors will cause thethe current transaction to be rollwd back.if autoRollback is 2, then only the failing row will berolled back.</i><p></dl><a name="getAutoRollback()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getAutoRollback"><b>getAutoRollback</b></a><pre> public synchronized int getAutoRollback() throws SQLException</pre><dl>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -