• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

What is an SQL procedure

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Martin Vajsar wrote:I'm still not sure what are you asking about. Do you want a more in-depth explanation of how storing SQL queries in properties file works?



I just want to know what SQL Procedures are and why it is used...!!
 
Marshal
Posts: 3838
66
Netbeans IDE Oracle Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since you were actually asking two questions, I've split it into a separate topic. Next time please UseOneThreadPerQuestion.

SQL procedures, usually called stored procedures, are a piece of code stored and executed inside the database. Different databases use different languages for stored procedures, for example MS SQL Server uses Transact-SQL, and Oracle uses PL/SQL. Plain SQL commands and queries can usually be easily embedded into the stored procedure. Stored procedures are part of the database schema. A Java application would typically call a stored procedure which was created in the database by a setup script, for example. It is possible to create a new stored procedure from Java, but certainly not usual. JDBC has a special escape sequence for calling a stored procedure, because the exact syntax used to call it may differ among databases.

The most important reason to use a stored procedure is (in my opinion) to move processing to the database, so a to avoid transferring large amounts of data from database to application and back over the network. There are other valid reasons, such as concentrating DB specific features inside stored procedures, so that in case of migration to another database just the stored procedures would have to be ported.

Wikipedia has some more information on stored procedures.
 
Did Steve tell you that? Fuh - Steve. Just look at this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!