sql >> Base de Datos >  >> RDS >> Oracle

Cómo leer y almacenar datos XML en la base de datos

Para formar una consulta, debe usar PreparedStatement .

Un ejemplo de uso:

String query = "INSERT INTO some_table (col1,col2,col3) values (?,?,?)
PreparedStatement stmt = null;
stmt = con.prepareStatement(query);
//now use the values from the xml and bind them to the statement
stmt.setString(someStringValue);
stmt.setInt(someIntValue);
...
stmt.execute();