实现批量删除和模糊查询
1、实现批量删除:
package test_path;
import org.junit.Test;
import java.sql.*;
public class MoHuAndDeleteTest {
@Test
public void testMoMu(){
Connection conn=null;
PreparedStatement ps=null;
ResultSet rs=null;
String mohu="a";
try{
//1、注册驱动
Class.forName("com.mysql.jdbc.Driver");
conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/test1", "root", "root");
ps=conn.prepareStatement("select * from t_user where uname like concat('%',?,'%')");<