Ejercicios capítulo 8 bloque 2

This commit is contained in:
2025-03-03 23:05:34 +01:00
parent 4bd06846e9
commit c6cf4cc521
14 changed files with 612 additions and 156 deletions

View File

@@ -0,0 +1,12 @@
package capitulo08.bloque01y02.operaciones;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
public class Delete {
public static int eliminarRegistro(Connection conn, String tabla, int id) throws SQLException {
Statement st = conn.createStatement();
return st.executeUpdate("delete from tutorialjavacoches." + tabla + " where id=" + id + ";");
}
}