📄 selectdb.java
字号:
package Dbprocess;
import java.sql.*;
public class SelectDB {
Connection con;
ResultSet resultSet;
/**
* Select * from atable
*/
public SelectDB(String atable){
try{
String sql = "Select * from ?";
PreparedStatement pstate = con.prepareStatement(sql);
pstate.setString(1,atable);
resultSet = pstate.executeQuery();
}
catch (Exception e) {
e.printStackTrace();
}
}
/**
* Select
*
*/
public SelectDB(){
}
public Connection getCon() {
return con;
}
public ResultSet getResultSet() {
return resultSet;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -