Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Creating Pl/Sql Function from java  RSS feed

 
jagan raja
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have created a function from java using prepare statement. And this works fine.

The below is just a snippet. I have got the function as below. It works fine.




Now I have to check if that function exists prior to the creation from java.

How can i do that?

Can anyone help me out???
 
Amit Vinod Dali
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can run sql (using jdbc) on the database system tables e.g. "DBA_OBJECTS" (req. admin users) which contains the metadata (related to function, procedure, tables etc).

Oracle System Tables are as; (Assuming you are using oracle database)
Oracle System Tables
 
jagan raja
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your suggestion..............
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!