Posts Oracle plsql calling procedure using java
Post
Cancel

Oracle plsql calling procedure using java

  • sample procedure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
create or replace procedure proc_truncate_table
is
begin
 execute immediate 'truncate table data_table';
end;

* calling above procedure from jdbc

```console
try (Connection connection = getConnection()) {
    try (CallableStatement statement = connection.prepareCall("{call proc_truncate_table()}")) {
        statement.execute();
    }
}
This post is licensed under CC BY 4.0 by the author.