Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 71d40963b505df4524269198e237b3e3 > files > 883

virtuoso-opensource-doc-6.1.4-2.fc14.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
 <head profile="http://internetalchemy.org/2003/02/profile">
  <link rel="foaf" type="application/rdf+xml" title="FOAF" href="http://www.openlinksw.com/dataspace/uda/about.rdf" />
  <link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" />
  <meta name="dc.title" content="9. SQL Procedure Language Guide" />
  <meta name="dc.subject" content="9. SQL Procedure Language Guide" />
  <meta name="dc.creator" content="OpenLink Software Documentation Team ;&#10;" />
  <meta name="dc.copyright" content="OpenLink Software, 1999 - 2009" />
  <link rel="top" href="index.html" title="OpenLink Virtuoso Universal Server: Documentation" />
  <link rel="search" href="/doc/adv_search.vspx" title="Search OpenLink Virtuoso Universal Server: Documentation" />
  <link rel="parent" href="sqlprocedures.html" title="Chapter Contents" />
  <link rel="prev" href="sqlreference.html" title="SQL Reference" />
  <link rel="next" href="GENERALPRINCIPLES.html" title="General Principles" />
  <link rel="shortcut icon" href="../images/misc/favicon.ico" type="image/x-icon" />
  <link rel="stylesheet" type="text/css" href="doc.css" />
  <link rel="stylesheet" type="text/css" href="/doc/translation.css" />
  <title>9. SQL Procedure Language Guide</title>
  <meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8" />
  <meta name="author" content="OpenLink Software Documentation Team ;&#10;" />
  <meta name="copyright" content="OpenLink Software, 1999 - 2009" />
  <meta name="keywords" content="" />
  <meta name="GENERATOR" content="OpenLink XSLT Team" />
 </head>
 <body>
  <div id="header">
    <a name="sqlprocedures" />
    <img src="../images/misc/logo.jpg" alt="" />
    <h1>9. SQL Procedure Language Guide</h1>
  </div>
  <div id="navbartop">
   <div>
      <a class="link" href="sqlprocedures.html">Chapter Contents</a> | <a class="link" href="sqlreffastphrasematch.html" title="Fast Phrase Match Processor">Prev</a> | <a class="link" href="GENERALPRINCIPLES.html" title="General Principles">Next</a>
   </div>
  </div>
  <div id="currenttoc">
   <form method="post" action="/doc/adv_search.vspx">
    <div class="search">Keyword Search: <br />
        <input type="text" name="q" /> <input type="submit" name="go" value="Go" />
    </div>
   </form>
   <div>
      <a href="http://www.openlinksw.com/">www.openlinksw.com</a>
   </div>
   <div>
      <a href="http://docs.openlinksw.com/">docs.openlinksw.com</a>
   </div>
    <br />
   <div>
      <a href="index.html">Book Home</a>
   </div>
    <br />
   <div>
      <a href="contents.html">Contents</a>
   </div>
   <div>
      <a href="preface.html">Preface</a>
   </div>
    <br />
   <div>
      <a href="overview.html">Overview</a>
   </div>
   <div>
      <a href="installation.html">Installation Guide</a>
   </div>
   <div>
      <a href="quicktours.html">Quick Start &amp; Tours</a>
   </div>
   <div>
      <a href="sampleapps.html">Sample ODBC &amp; JDBC Applications</a>
   </div>
   <div>
      <a href="concepts.html">Conceptual Overview</a>
   </div>
   <div>
      <a href="server.html">Administration</a>
   </div>
   <div>
      <a href="accessinterfaces.html">Data Access Interfaces</a>
   </div>
   <div>
      <a href="sqlreference.html">SQL Reference</a>
   </div>
   <div class="selected">
      <a href="sqlprocedures.html">SQL Procedure Language Guide</a>
    <div>
        <a href="GENERALPRINCIPLES.html" title="General Principles">General Principles</a>
    </div>
    <div>
        <a href="SCOPEOFDECLARATION.html" title="Scope of Declarations">Scope of Declarations</a>
    </div>
    <div>
        <a href="sqlplDATATYPES.html" title="Data Types">Data Types</a>
    </div>
    <div>
        <a href="RESULTSETS.html" title="Handling Result Sets">Handling Result Sets</a>
    </div>
    <div>
        <a href="ARRAYS.html" title="Result Sets and Array Parameters">Result Sets and Array Parameters</a>
    </div>
    <div>
        <a href="EXCEPTIONS.html" title="Exception Semantics">Exception Semantics</a>
    </div>
    <div>
        <a href="PLREF.html" title="Virtuoso/PL Syntax">Virtuoso/PL Syntax</a>
    </div>
    <div>
        <a href="EXECSQLPROCSELECT.html" title="Execute Stored Procedures via SELECT statement">Execute Stored Procedures via SELECT statement</a>
    </div>
    <div>
        <a href="EXECSQLPROCFORK.html" title="Execute Stored Procedures In Background">Execute Stored Procedures In Background</a>
    </div>
    <div>
        <a href="createassembly.html" title="CREATE ASSEMBLY Syntax - External Libraries">CREATE ASSEMBLY Syntax - External Libraries</a>
    </div>
    <div>
        <a href="createexthostproc.html" title="CREATE PROCEDURE Syntax - External hosted procedures">CREATE PROCEDURE Syntax - External hosted procedures</a>
    </div>
    <div>
        <a href="ASYNCEXECMULTITHREAD.html" title="Asynchronous Execution and Multithreading in Virtuoso/PL">Asynchronous Execution and Multithreading in Virtuoso/PL</a>
    </div>
    <div>
        <a href="PERFTIPS.html" title="Performance Tips">Performance Tips</a>
    </div>
    <div>
        <a href="PROCEDURES_TRANSACTIONS.html" title="Procedures and Transactions">Procedures and Transactions</a>
    </div>
    <div>
        <a href="twopcimplementation.html" title="Distributed Transaction &amp; Two Phase Commit">Distributed Transaction &amp; Two Phase Commit</a>
    </div>
    <div>
        <a href="TRIGGERS.html" title="Triggers">Triggers</a>
    </div>
    <div>
        <a href="charescaping.html" title="Character Escaping">Character Escaping</a>
    </div>
    <div>
        <a href="PLSCROLLCRSRS.html" title="Virtuoso/PL Scrollable Cursors">Virtuoso/PL Scrollable Cursors</a>
    </div>
    <div>
        <a href="plmodules.html" title="Virtuoso PL Modules">Virtuoso PL Modules</a>
    </div>
    <div>
        <a href="handlingplcondit.html" title="Handling Conditions In Virtuoso/PL Procedures">Handling Conditions In Virtuoso/PL Procedures</a>
    </div>
    <div>
        <a href="pldebugger.html" title="Procedure Language Debugger">Procedure Language Debugger</a>
    </div>
    <div>
        <a href="rowlevelsecurity.html" title="Row Level Security">Row Level Security</a>
    </div>
   </div>
   <div>
      <a href="hooks.html">Database Event Hooks</a>
   </div>
   <div>
      <a href="repl.html">Data Replication, Synchronization and Transformation Services</a>
   </div>
   <div>
      <a href="webappdevelopment.html">Web Application Development</a>
   </div>
   <div>
      <a href="webandxml.html">XML Support</a>
   </div>
   <div>
      <a href="rdfandsparql.html">RDF Data Access and Data Management</a>
   </div>
   <div>
      <a href="webservices.html">Web Services</a>
   </div>
   <div>
      <a href="runtimehosting.html">Runtime Hosting</a>
   </div>
   <div>
      <a href="internetservices.html">Internet Services</a>
   </div>
   <div>
      <a href="freetext.html">Free Text Search</a>
   </div>
   <div>
      <a href="tpcc.html">TPC C Benchmark Kit</a>
   </div>
   <div>
      <a href="xa.html">Using Virtuoso with Tuxedo</a>
   </div>
   <div>
      <a href="appendixa.html">Appendix</a>
   </div>
   <div>
      <a href="functions.html">Virtuoso Functions Guide</a>
   </div>
    <br />
  </div>
  <div id="text">
   <div class="abstract">
      <h2>Abstract</h2>
      <p>Stored procedures are a key component of database performance.  The fewer
messages are sent between the client and the server for a given transaction,
the faster it will complete.</p>
      <p>Virtuoso/PL is a simple and straightforward language for writing stored
procedures and triggers in Virtuoso.  Its syntax is a combination of SQL and
C, making learning it as easy as possible. It offers the features commonly
found in database procedure languages in a simple, efficient and concise
package. This document presents the primary concepts of the language and
ends with a reference section.</p>
   </div>
    <h2>Table of Contents</h2>
   <div class="minitoc">
    <div>
        <a class="sect1" href="GENERALPRINCIPLES.html">9.1. General Principles</a>
    </div>
    <div>
        <a class="sect1" href="SCOPEOFDECLARATION.html">9.2. Scope of Declarations</a>
    </div>
    <div>
        <a class="sect1" href="sqlplDATATYPES.html">9.3. Data Types</a>
    </div>
    <div>
        <a class="sect1" href="RESULTSETS.html">9.4. Handling Result Sets</a>
    </div>
    <div>
        <a class="sect1" href="ARRAYS.html">9.5. Result Sets and Array Parameters</a>
    </div>
    <div>
        <a class="sect1" href="EXCEPTIONS.html">9.6. Exception Semantics</a>
    </div>
    <div>
        <a class="sect1" href="PLREF.html">9.7. Virtuoso/PL Syntax</a>
    </div>
    <div>
        <a class="sect2" href="PLREF.html#createprocstmt">9.7.1. Create Procedure Statement</a>
    </div>
    <div>
        <a class="sect2" href="PLREF.html#grantprocstmt">9.7.2. Grand Execute Statement</a>
    </div>
    <div>
        <a class="sect2" href="PLREF.html#spasviewsandtablespl">9.7.3. Stored Procedures as Views &amp; Derived Tables</a>
    </div>
    <div>
        <a class="sect2" href="PLREF.html#kwds">9.7.4. Keyword and Optional Procedure Arguments</a>
    </div>
    <div>
        <a class="sect2" href="PLREF.html#whilestmt">9.7.5. if, while, for, foreach statements</a>
    </div>
    <div>
        <a class="sect2" href="PLREF.html#compoundstmts">9.7.6. compound statement</a>
    </div>
    <div>
        <a class="sect2" href="PLREF.html#gotortnstmts">9.7.7. goto, return statements</a>
    </div>
    <div>
        <a class="sect2" href="PLREF.html#wheneverstmt">9.7.8. whenever statement</a>
    </div>
    <div>
        <a class="sect2" href="PLREF.html#callassignstmt">9.7.9. call, assignment statements</a>
    </div>
    <div>
        <a class="sect2" href="PLREF.html#openfetchetcintostmts">9.7.10. open, fetch, close, select ... into statements</a>
    </div>
    <div>
        <a class="sect2" href="PLREF.html#forstmt">9.7.11. FOR Select Statement</a>
    </div>
    <div>
        <a class="sect2" href="PLREF.html#setstmt">9.7.12. SET statement</a>
    </div>
    <div>
        <a class="sect2" href="PLREF.html#settriggers">9.7.13. SET Triggers</a>
    </div>
    <div>
        <a class="sect1" href="EXECSQLPROCSELECT.html">9.8. Execute Stored Procedures via SELECT statement</a>
    </div>
    <div>
        <a class="sect1" href="EXECSQLPROCFORK.html">9.9. Execute Stored Procedures In Background</a>
    </div>
    <div>
        <a class="sect1" href="createassembly.html">9.10. CREATE ASSEMBLY Syntax - External Libraries</a>
    </div>
    <div>
        <a class="sect1" href="createexthostproc.html">9.11. CREATE PROCEDURE Syntax - External hosted procedures</a>
    </div>
    <div>
        <a class="sect1" href="ASYNCEXECMULTITHREAD.html">9.12. Asynchronous Execution and Multithreading in Virtuoso/PL</a>
    </div>
    <div>
        <a class="sect2" href="ASYNCEXECMULTITHREAD.html#synchronization">9.12.1. Synchronization</a>
    </div>
    <div>
        <a class="sect1" href="PERFTIPS.html">9.13. Performance Tips</a>
    </div>
    <div>
        <a class="sect2" href="PERFTIPS.html#remember">9.13.1. Remember the following:</a>
    </div>
    <div>
        <a class="sect1" href="PROCEDURES_TRANSACTIONS.html">9.14. Procedures and Transactions</a>
    </div>
    <div>
        <a class="sect1" href="twopcimplementation.html">9.15. Distributed Transaction &amp; Two Phase Commit</a>
    </div>
    <div>
        <a class="sect2" href="twopcimplementation.html#twopc_send">9.15.1. Initiating Distributed Transactions</a>
    </div>
    <div>
        <a class="sect2" href="twopcimplementation.html#twopc_resp">9.15.2. Responding to Distributed Transactions</a>
    </div>
    <div>
        <a class="sect2" href="twopcimplementation.html#twopc_recovery">9.15.3. 2PC Log &amp; Recovery</a>
    </div>
    <div>
        <a class="sect2" href="twopcimplementation.html#twopc_errors">9.15.4. Error Codes</a>
    </div>
    <div>
        <a class="sect1" href="TRIGGERS.html">9.16. Triggers</a>
    </div>
    <div>
        <a class="sect2" href="TRIGGERS.html#createtrigger">9.16.1. The CREATE TRIGGER statement</a>
    </div>
    <div>
        <a class="sect2" href="TRIGGERS.html#triggers_on_views">9.16.2. Triggers on Views</a>
    </div>
    <div>
        <a class="sect2" href="TRIGGERS.html#droptrigger">9.16.3. The DROP TRIGGER statement</a>
    </div>
    <div>
        <a class="sect2" href="TRIGGERS.html#triggers_vdb">9.16.4. Triggers and Virtual Database</a>
    </div>
    <div>
        <a class="sect1" href="charescaping.html">9.17. Character Escaping</a>
    </div>
    <div>
        <a class="sect2" href="charescaping.html#backslashstmt">9.17.1. Statement Level</a>
    </div>
    <div>
        <a class="sect2" href="charescaping.html#backslashconlevel">9.17.2. Connection Level</a>
    </div>
    <div>
        <a class="sect2" href="charescaping.html#backslashserver">9.17.3. Server Default</a>
    </div>
    <div>
        <a class="sect1" href="PLSCROLLCRSRS.html">9.18. Virtuoso/PL Scrollable Cursors</a>
    </div>
    <div>
        <a class="sect2" href="PLSCROLLCRSRS.html#PLSCROLLDECLARE">9.18.1. Declaring a Scrollable Cursor</a>
    </div>
    <div>
        <a class="sect2" href="PLSCROLLCRSRS.html#PLSCROLLOPEN">9.18.2. Opening a Scrollable Cursor</a>
    </div>
    <div>
        <a class="sect2" href="PLSCROLLCRSRS.html#PLSCROLLFETCH">9.18.3. Fetching Data From a Scrollable Cursor</a>
    </div>
    <div>
        <a class="sect2" href="PLSCROLLCRSRS.html#PLSCROLLEXAMPLES">9.18.4. Virtuoso/PL Scrollable Cursor Examples</a>
    </div>
    <div>
        <a class="sect2" href="PLSCROLLCRSRS.html#PLFORWARDONLYCR">9.18.5. FORWARD-ONLY (traditional cursor statement) Example</a>
    </div>
    <div>
        <a class="sect2" href="PLSCROLLCRSRS.html#PLDYNAMICCR">9.18.6. DYNAMIC (traditional cursor statement) Example</a>
    </div>
    <div>
        <a class="sect2" href="PLSCROLLCRSRS.html#PLKEYSETCR">9.18.7. KEYSET (traditional cursor statement) Example</a>
    </div>
    <div>
        <a class="sect1" href="plmodules.html">9.19. Virtuoso PL Modules</a>
    </div>
    <div>
        <a class="sect2" href="plmodules.html#plmodsyntax">9.19.1. Syntax</a>
    </div>
    <div>
        <a class="sect2" href="plmodules.html#plmodsecurity">9.19.2. Security</a>
    </div>
    <div>
        <a class="sect1" href="handlingplcondit.html">9.20. Handling Conditions In Virtuoso/PL Procedures</a>
    </div>
    <div>
        <a class="sect2" href="handlingplcondit.html#declarecondit">9.20.1. Declaring Condition Handlers</a>
    </div>
    <div>
        <a class="sect2" href="handlingplcondit.html#stacktracesql">9.20.2. Stack Trace Reporting On Sql Error Generation</a>
    </div>
    <div>
        <a class="sect1" href="pldebugger.html">9.21. Procedure Language Debugger</a>
    </div>
    <div>
        <a class="sect2" href="pldebugger.html#pldbgplcoverage">9.21.1. Branch Coverage</a>
    </div>
    <div>
        <a class="sect2" href="pldebugger.html#pldcovfunctions">9.21.2. Coverage Functions</a>
    </div>
    <div>
        <a class="sect1" href="rowlevelsecurity.html">9.22. Row Level Security</a>
    </div>
    <div>
        <a class="sect2" href="rowlevelsecurity.html#pldrlsfunctions">9.22.1. Row Level Security Functions</a>
    </div>
   </div>
    <br />
   <table border="0" width="90%" id="navbarbottom">
    <tr>
        <td align="left" width="33%">
          <a href="sqlreffastphrasematch.html" title="Fast Phrase Match Processor">Previous</a>
          <br />Fast Phrase Match Processor</td>
     <td align="center" width="34%">
          <a href="sqlprocedures.html">Chapter Contents</a>
     </td>
        <td align="right" width="33%">
          <a href="GENERALPRINCIPLES.html" title="General Principles">Next</a>
          <br />General Principles</td>
    </tr>
   </table>
  </div>
  <div id="footer">
    <div>Copyright© 1999 - 2009 OpenLink Software All rights reserved.</div>
   <div id="validation">
    <a href="http://validator.w3.org/check/referer">
        <img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" />
    </a>
    <a href="http://jigsaw.w3.org/css-validator/">
        <img src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" height="31" width="88" />
    </a>
   </div>
  </div>
 </body>
</html>