Skip to content

Latest commit

 

History

History

oracle

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Prefer TIMESTAMP over DATE

See https://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281.html#08_01

I had problems with different behavior of JDBC driver. Sometimes DATE field contained h/m/s, sometimes not...

Calling procedure from Spring

See https://docs.spring.io/spring/docs/3.0.0.M4/reference/html/ch12s05.html

Out parameter is read after EXECUTE:

SqlParameterSource in = new MapSqlParameterSource()
                .addValue("in_id", id); 
Map out = procReadActor.execute(in); // this
Actor actor = new Actor();
actor.setId(id);
actor.setFirstName((String) out.get("out_first_name"));  // here

Drop all tables

select 'drop table ' || table_name || ' cascade constraints;' from user_tables;

PLS_INTEGER problem

JDBC driver in combination with Spring doesn't resolve type PLS_INTEGER !? So we need to add this in params list:

new SqlOutParameter("RETURN", OracleTypes.NUMBER),