--- title: "clearBatch Method (SQLServerStatement) | 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: - "SQLServerStatement.clearBatch" apilocation: - "sqljdbc.jar" apitype: "Assembly" ms.assetid: e6fc1461-bbc6-45ae-85b1-a824aba51085 author: David-Engel ms.author: v-daenge --- # clearBatch Method (SQLServerStatement) [!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 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 [SQLServerStatement Members](../../../connect/jdbc/reference/sqlserverstatement-members.md) [SQLServerStatement Class](../../../connect/jdbc/reference/sqlserverstatement-class.md)