--- title: "clearBatch Method (SQLServerPreparedStatement) | Microsoft Docs" ms.custom: "" ms.date: "01/19/2017" ms.prod: sql ms.prod_service: connectivity ms.reviewer: "" ms.technology: connectivity ms.topic: conceptual apiname: - "SQLServerPreparedStatement.clearBatch" apilocation: - "sqljdbc.jar" apitype: "Assembly" ms.assetid: 6e5cda26-e24d-4637-8dfd-8135ba126e3b author: David-Engel ms.author: v-daenge --- # clearBatch Method (SQLServerPreparedStatement) [!INCLUDE[Driver_JDBC_Download](../../../includes/driver_jdbc_download.md)] Empties the current list of SQL commands for this [SQLServerStatement](../../../connect/jdbc/reference/sqlserverstatement-class.md) object. ## Syntax ``` public final void clearBatch() ``` ## Exceptions [SQLServerException](../../../connect/jdbc/reference/sqlserverexception-class.md) ## Remarks This clearBatch method is specified by the clearBatch method in the java.sql.Statement interface. ## See Also [SQLServerPreparedStatement Members](../../../connect/jdbc/reference/sqlserverpreparedstatement-members.md) [SQLServerPreparedStatement Class](../../../connect/jdbc/reference/sqlserverpreparedstatement-class.md)