java--select*

if(...){
}
for(...){
}
for(xx:XX){
}
------
List,Set,Map
List xxx = new ArrayList();
-----------
import java.util.Date
Date xxxx = new Date();
SimpleDateFormat xxx = new SimpleDateFormat("yyyy-MM-dd");
xxx.format(xxxx);
----------------
JDBC:
Class.forname("....");
Connection conn = DriverManager.getConnection(url);
PreparedStatement pst = conn.prepareStatement(sql);
pst.setString(1,"");
pst.setString(2,"");
pst.execute();
ResultSet rs = pst.executeQuery();
while(rs.next()){
rs.getString("sno");
}

rs.close();
pst.close();
conn.close();

posted @ 2017-06-14 19:35  会玩代码的摄影师  阅读(205)  评论(0编辑  收藏  举报