Here you can find the source of truncateTable(Connection conn)
public static void truncateTable(Connection conn) throws SQLException
//package com.java2s; // %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt import java.sql.Connection; import java.sql.SQLException; import java.sql.Statement; public class Main { public static void truncateTable(Connection conn) throws SQLException { try (Statement statement = conn.createStatement()) { statement.execute("delete from TEST"); }/*from w w w . j a va 2s . co m*/ } }