【发布时间】:2013-07-25 17:28:42
【问题描述】:
我是 oracle 的新手,我正在尝试使用 IntelliJ IDEA 数据库浏览器来查看我的数据和表格。..
我在我的 linux 计算机上进行了 oracle xe 的基本安装,下面的 java 代码进行了插入,并且还将返回所有数据:
try {
//step1 load the driver class
Class.forName("oracle.jdbc.driver.OracleDriver");
//step2 create the connection object
Connection con = DriverManager.getConnection(
"jdbc:oracle:thin:@localhost:1521:xe", "system", "xxx");
//step3 create the statement object
Statement stmt = con.createStatement();
//step4 execute query
Boolean ret = stmt.execute("insert into emp values (1, \'John\', 43)");
ResultSet rs = stmt.executeQuery("select * from emp");
while (rs.next())
System.out.println(rs.getInt(1) + " " + rs.getString(2) + " " + rs.getString(3));
//step5 close the connection object
con.close();
但如果我尝试使用 IntelliJ IDEA 数据库浏览器,我看不到任何 XE 数据库或我的表。但我使用的是相同的连接数据。
这是我在屏幕上看到的内容
谁能告诉我应该在哪里寻找我的表格和数据..谢谢
【问题讨论】:
标签: java intellij-idea oracle11g