Row « oracle « Java Database Q&A

1. Bulk Row Transfer between Oracle Databases with a Select Filter

Basically, I'm trying to selectively copy a table from one database to another. I have two different [Oracle] databases (e.g., running on different hosts) with the same schema. I'm interested in ...

2. iBatis not populating object when there are no rows found

I am running a stored procedure that returns 2 cursors and none of them have any data. I have the following mapping xml:

<resultMap id="resultMap1" class="HashMap">
  <result property="firstName" columnIndex="2"/>

<resultMap id="resultMap2" class="com.somePackage.MyBean">

3. Value from last inserted row in DB

Is there some way to get a value from the last inserted row? I am inserting a row where the PK will automatically increase due to sequence created, and I would like ...

4. PLSQL JDBC: How to get last row ID?

What's PLSQL (Oracle) equivalent of this SQL server snippet?

INSERT INTO mytable(content) VALUES ("test") -- assume there's an ID column that is autoincrement
In C#, you can call myCommand.ExecuteScalar() to ...

5. Get last ID on inserted row in Oracle DB

I have problem getting ID from tables. I have two tables AJPES_TR and TR_LOG and PK from TR_LOG table is set as foreign key in AJPES_TR table. In TR_LOG table I ...

6. Unable to insert a row in Oracle with Java (JDBC) --> error ORA-00917: missing comma

I have a problem during an insert in Oracle using Java and JDBC. The error obtained is:

java.sql.SQLException: ORA-00917: missing comma
The data for the insert is taken from a form ...

7. Problem inserting row into oracle

Any idea why this doesn't work? The name of the table is TESTTABLE with just one column called TEST_COLUMN which is the primary key. I'm sure it is something dumb, but thought ...

8. How to access Oracle table stats, specifically NUM_ROWS and AVG_ROW_LEN, using JDBC?

Is there a way to access Oracle table level statistics in a Java application using JDBC? I'm specifically interested in values NUM_ROWS and AVG_ROW_LEN for the purpose of estimating optimal memory ...

9. Oracle/OJDBC BLOB update problem on non-existing rows?

I ran into very peculiar problem with BLOBs in Oracle. I'm using OracleXE 10g ( version of database), and tried it with ojdbc14_g drivers version, and The same ...

10. how to check if a query has affected a row or not in Java Netbeans Oracle

static void firequery(String q)
try {

Class.forName ("oracle.jdbc.OracleDriver");/*driver*/
  con = DriverManager.getConnection(dbUrl, "system", "demo");

stmt = con.createStatement();
rs = stmt.executeQuery(query);
} //end try

catch(ClassNotFoundException e) {
catch(SQLException e) {

I'm passing my query in firequery(s) function ...

12. how to return multiple row from oracle 9i procedure

Hi Friends, I have an oracle procedure/function which will return set of rows. Rows fetched from table will be changed in the procedure and then returned . Is there any I could return a ref cursor after first manipulating the records. I newbie to pl/sql please help Sonu [ May 23, 2003: Message edited by: Sonu Ghosh ]

13. Row locking using oracle database

I have a problem on record locking using JDBC. My application have a JTable to show the records of the table in Oracle DB. User can select the row in the table and the form is shown to display the detail of the record. Before the form is display, I am using the statement SELECT * FROM TABLE_NAME WHERE ID = ...

14. Workarounds for Oracle Table, Row, Record, Boolean data types

As I understand it, there is no support for the Oracle Table, Row, Recid, Record, Boolean data types using the current JDBC implementations. I have read that in the JDBC 3.0 specification, there might be some support for RECID. I was wondering what other folks have done to deal with this issue. In my case, I am calling an Oracle stored ...

15. oracle thin driver scrollable resultset.absolute(1) is not returing the first row

Hello, I am doing pagging with oracle scrollable resultset. I have a query "select * from (complex subquery here) where rownum<=20" and I am using the oracle thin driver scrollable resultset and point to rs.absolute(1) to expect getting the 20 records. However the first record is always missing(only the 2nd-20th rows returned). If I changed the rs.absolute(1) to rs.beforeFirst(), then all ...

16. Row count in oracle..?