📄 e1704.java
字号:
import java.sql.*;
public class E1704
{
public static void main(String args[])
{
String[] tel={"(07)3333333","(07)4444444"};
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}
catch(ClassNotFoundException e)
{
System.out.println(e.getMessage());
}
try
{
Connection con=DriverManager.getConnection("jdbc:odbc:bookbase");
Statement stmt=con.createStatement();
PreparedStatement pstmt=con.prepareStatement("delete name from mailTab where tel =?");
for(int i=0;i<tel.length;i++)
{
pstmt.setString(1,tel[i]);
pstmt.executeUpdate();
}
stmt.close();
con.close();
}
catch(SQLException ex)
{
System.out.println("SQLException:"+ex.getMessage());
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -