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_ORA-12545:因目标主机或对象不存在,连接失败
- Oracle数据库url连接最后一个orcl代表的是配置的数据库SID
- java连接oracle不能连接自己建的库的sid,只能连接orcl,急........
- orcl创建数据库
- 如何替换orcl实例下的四个数据库
- orcl密码过时和权限授予
- Oracle安装时无法用Database Control-orcl中打开访问网址的解决办法
- orcl
- orcl数据库锁等级研究小记
- OEM无法启动:oracle/product/10.2.0/dbhome_1/oc4j/j2ee/OC4J_DBConsole_localhost.localdomain_orcl not found.