自己做网站视频教程,如何找工程项目信息,wordpress 技术博客,中小学教师兼职做网站在java中执行SQL语句要特别注意通配符的问题#xff0c;否则是不会成功的#xff1a;在ACCESS中的通配符是*例#xff1a;select * from student where name like 张*在标准的SQL语言中的通配符是%例#xff1a;select * from student where name like 张%在java…在java中执行SQL语句要特别注意通配符的问题否则是不会成功的在ACCESS中的通配符是*例select * from student where name like 张*在标准的SQL语言中的通配符是%例select * from student where name like 张%在java中要执行上述的功能必须是select * from student where name like 张%%举例import java.sql.*;public class DB {public static void main(String[] args) {try {String url jdbc:odbc:driver{Microsoft Access Driver(*.mdb)};DBQE://student;String user admin;String pwd root;Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);Connection conn DriverManager.getConnection(url, user, pwd);Statement stmt conn.createStatement();ResultSet rs stmt.executeQuery(select * from student where name like 张%%);rs.close();stmt.close();conn.close();} catch (Exception e) {e.printStackTrace();}}}