This question looks very similar to the topic you have started
here.
Because both topics are about executing SQL statements using JDBC (and it makes no difference which SQL statements you try to execute), I close this topic and the discussion/help/guidance will be continued in
the aforementioned topic.
PS. Always use code tags when posting code to the forums. Unformatted or unindented code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please click this link ⇒
UseCodeTags ⇐ for more information. Properly indented and formatted code greatly increases the probability that your question will get quicker, better answers. I've gone ahead and added the code tags for you. See how much easier the code is to read? If you want to see a few usage examples (and which options you can use), have a look at the
Using Code Tags section of the Ranch Guide.