- 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();
}
}