Java SQL Table truncateTable(Connection conn)

Here you can find the source of truncateTable(Connection conn)

Description

truncate Table

License

Open Source License

Declaration

public static void truncateTable(Connection conn) throws SQLException 

Method Source Code

//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*/
    }
}

Related

  1. isTableEmpty(Connection con, String schemaName, String tableName)
  2. normalizeTableName(String table, Connection con)
  3. parse(Connection connection, String tableName, String type)
  4. queryAllFromTable(String tableName)
  5. quoteSchemaTable(Connection conn, String schema, String table)
  6. truncateTable(Connection conn, String table_name)
  7. truncateTable(Connection conn, String tablename)