We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 05b8efa commit 9027511Copy full SHA for 9027511
1 file changed
src/main/java/io/github/intisy/utils/custom/SQL.java
@@ -86,6 +86,19 @@ private Connection initializeConnection() {
86
}
87
88
89
+ public void deleteTable(String tableName) {
90
+ String sql = "DROP TABLE IF EXISTS " + tableName;
91
+
92
+ try (Connection connection = getConnection();
93
+ Statement statement = connection.createStatement()) {
94
95
+ statement.execute(sql);
96
+ logger.debug("Table '" + tableName + "' deleted successfully.");
97
+ } catch (SQLException e) {
98
+ logger.exception(e);
99
+ }
100
101
102
@Override
103
public void close() {
104
try {
0 commit comments