Table Of Contents#
- Preface
- About This Manual
- 1. Introduction to Stored Procedures
- Overview
- Structure of Stored Procedures
- Considerations when using Stored Procedures
- 2. SQL Statements for Managing Stored Procedures
- Overview
- CREATE PROCEDURE
- ALTER PROCEDURE
- DROP PROCEDURE
- EXECUTE
- CREATE FUNCTION
- ALTER FUNCTION
- DROP FUNCTION
- 3. Stored Procedure Blocks
- Stored Procedure Block
- Declaring Local Variables
- SELECT INTO
- RETURNING INTO Clause
- Assignment Statements
- LABEL
- RETURN
- INSERT Extension
- UPDATE Extension
- 4. Control Flow Statement
- Overview
- IF
- CASE
- LOOP
- WHILE LOOP
- FOR LOOP
- EXIT
- CONTINUE
- GOTO
- NULL
- 5. Using Cursors
- Overview
- CURSOR
- OPEN
- FETCH
- CLOSE
- Cursor FOR LOOP
- Cursor Attributes
- 6. User-Defined Types
- Overview
- Defining a User-Defined Type
- Functions for Use with Associative Arrays
- Using RECORD Type Variables and Associative Array Variables
- REF CURSOR
- 7. Typesets
- Overview
- CREATE TYPESET
- DROP TYPESET
- 8. Dynamic SQL
- Overview
- EXECUTE IMMEDIATE
- OPEN FOR
- 9. Exception Handlers
- Overview
- EXCEPTION
- RAISE
- RAISE_APPLICATION_ERROR
- User-defined Exceptions
- SQLCODE and SQLERRM
- Exception Handler
- 10. Pragma
- Overview
- Autonomous Transaction Pragma
- Exception Initialization Pragma
- 11. Stored Packages
- Overview
- CREATE PACKAGE
- CREATE PACKAGE BODY
- ALTER PACKAGE
- DROP PACKAGE
- EXECUTE
- 12. Altibase Stored Procedures and Built-in Functions
- File Control
- TCP Access Control
- DBMS Stats
- Miscellaneous Functions
- 13. Altibase System-defined Stored Packages
- System-defined Stored Packages
- DBMS_APPLICATION_INFO
- DBMS_ALERT
- DBMS_CONCURRENT_EXEC Package
- DBMS_LOCK
- DBMS_METADATA
- DBMS_OUTPUT
- DBMS_RANDOM
- DBMS_RECYCLEBIN Package
- DBMS_SQL
- DBMS_SQL_PLAN_CACHE
- DBMS_STANDARD
- DBMS_STATS
- DBMS_UTILITY
- STANDARD
- SYS_SPATIAL
- UTL_COPYSWAP
- UTL_FILE
- UTL_RAW
- UTL_SMTP
- UTL_TCP
- Appendix A. Examples
- Stored Procedure Examples
- File Control Example
- UTL_SMTP Example
- Checking SENDMAIL DAEMON Example