码迷,mamicode.com
首页 > 其他好文 > 详细

orcl

时间:2015-05-06 17:01:43      阅读:108      评论:0      收藏:0      [点我收藏+]

标签:

Class.forName("orcle.jdbc.driver.OracleDriver");
	
		Connection conn=DriverManager.getConnection("jdbc.oracle:thin:@localhost:1521:orcl","scott","tiger");
	
		Statement stmt=conn.createStatement();
		ResultSet rs=stmt.executeQuery("select * from emp");
		while(rs.next()){
			
			System.out.println(rs.getString(1)+rs.getString(2));
		}
		rs.close();
		stmt.close();
		conn.close();

 

orcl

标签:

原文地址:http://www.cnblogs.com/wzz1020/p/4482076.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!