Here you can find the source of dropTable(Connection con, String tableName)
Parameter | Description |
---|---|
con | la connection |
tableName | La table |
Parameter | Description |
---|---|
SQLException | Erreur SQL |
@Deprecated public static void dropTable(Connection con, String tableName) throws SQLException
//package com.java2s; /*//from w w w . j a va 2 s. c o m * codjo.net * * Common Apache License 2.0 */ import java.sql.Connection; import java.sql.SQLException; import java.sql.Statement; public class Main { @Deprecated public static void dropTable(Connection con, String tableName) throws SQLException { Statement stmt = null; try { stmt = con.createStatement(); stmt.executeUpdate("drop table " + tableName); } catch (SQLException ex) { ; // si la table n'existe pas... } finally { if (stmt != null) { stmt.close(); } } } }