📄 readme.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Oracle 10g PL/SQL Programming</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table width="77%" border="0">
<tr>
<td width="25%"><img src="0072230665.jpg" width="140" height="173"></td>
<td width="75%"><strong>Thank you for purchasing Oracle 10g PL/SQL Programming!
</strong></td>
</tr>
</table>
<p>The examples provided here are divided by chapter, and match those found in
the book. Each chapter contains a script to create the schema with all necessary
permissions. The permissions granted for the schemas change between chapters,
so be sure to run the schema creation script for each chapter and not rely on
the one created in another chapter. To avoid permissions problems it is highly
recommended that the schema creation script we provide be used, but you may
also create your own schema as long as all required privileges are granted.</p>
<p>The examples for each chapter are created to run independent of objects created
in other chapters. In other words - no cross-chapter dependencies. This means
you can jump from chapter 10 to 17, and have no problem running chapter 17's
examples.</p>
<p>When creating your database, be sure to install Oracle Text as it is used for
examples in multiple chapters. If not installed, some examples will not work
and you will receive errors on schema creation. Oracle Text is included in both
Standard and Enterprise editions, so either release can be used.</p>
<p>All examples were tested on Windows and Linux ports of Oracle 10g Release 1.
Should you have ANY problem with the examples, feel free to e-mail <a href="mail:%20Feedback@PLSQLBook.com">FEEDBACK@PLSQLBOOK.COM</a>,
and we will respond to the issue promptly. </p>
<p>Thank you!</p>
<hr>
<h2>EXAMPLES</h2>
<table width="100%" border="0">
<tr>
<td><a href="#CH1">Chapter 1</a></td>
<td><a href="#CH5">Chapter 5</a></td>
<td><a href="#CH9">Chapter 9</a></td>
<td><a href="#CH13">Chapter 13</a></td>
<td><a href="#CH17">Chapter 17</a></td>
</tr>
<tr>
<td><a href="#CH2">Chapter 2</a></td>
<td><a href="#CH6">Chapter 6</a></td>
<td><a href="#CH10">Chapter 10</a></td>
<td><a href="#CH14">Chapter 14</a></td>
<td> </td>
</tr>
<tr>
<td><a href="#CH3">Chapter 3</a></td>
<td><a href="#CH7">Chapter 7</a></td>
<td><a href="#CH11">Chapter 11</a></td>
<td><a href="#CH15">Chapter 15</a></td>
<td> </td>
</tr>
<tr>
<td><a href="#CH4">Chapter 4</a></td>
<td><a href="#CH8">Chapter 8</a></td>
<td><a href="#CH12">Chapter 12</a></td>
<td><a href="#CH16">Chapter 16</a></td>
<td> </td>
</tr>
</table>
<hr>
<p> </p>
<h4><a name="CH1"></a>Chapter 1: Introduction to PL/SQL</h4>
<table width="100%" border="1">
<tr>
<td width="29%"><a href="Chapter1/CreateUser.sql">CreateUser.sql</a></td>
<td width="71%">This script creates the plsql user for chapter 1 examples.
You must run this script as SYS or SYSTEM as SYSDBA. The script can be rerun.</td>
</tr>
<tr>
<td><a href="Chapter1/PlsqlBlock.sql">PlsqlBlock.sql</a></td>
<td>This script contains an example of a PL/SQL block of code.</td>
</tr>
</table>
<h4><a name="CH2"></a>Chapter 2: Using SQL*Plus and JDeveloper</h4>
<table width="100%" border="1">
<tr>
<td width="29%"><a href="Chapter2/CreateUser.sql">CreateUser.sql</a></td>
<td width="71%">This script creates the plsql user for chapter 2 examples.
You must run this script as SYS or SYSTEM as SYSDBA. The script can be rerun.</td>
</tr>
<tr>
<td><a href="Chapter2/DbmsOutput.sql">DbmsOutput.sql</a></td>
<td>This script demonstrates the DBMS_OUTPUT package.</td>
</tr>
<tr>
<td><a href="Chapter2/Debug.sql">Debug.sql</a></td>
<td>This script demonstrates debugging PL/SQL with JDeveloper.</td>
</tr>
</table>
<h4><a name="CH3"></a>Chapter 3: PL/SQL Basics</h4>
<table width="100%" border="1">
<tr>
<td><a href="Chapter3/CreateUser.sql">CreateUser.sql</a></td>
<td>This script creates the plsql user for chapter 3 examples. You must run
this script as SYS or SYSTEM as SYSDBA. The script can be rerun.</td>
</tr>
<tr>
<td width="29%"><a href="Chapter3/AnonymousBlock.sql">AnonymousBlock.sql</a></td>
<td width="71%">This script demonstrates the structure of an anonymous block.</td>
</tr>
<tr>
<td><a href="Chapter3/BindVariables.sql">BindVariables.sql</a></td>
<td>This script demonstrates the use of bind variables.</td>
</tr>
<tr>
<td><a href="Chapter3/BlockStructure.sql">BlockStructure.sql</a></td>
<td>This script demonstrates the structure of a block.</td>
</tr>
<tr>
<td><a href="Chapter3/Boolean.sql">Boolean.sql</a></td>
<td>This script demonstrates how to assign a value to a variable of type boolean.</td>
</tr>
<tr>
<td><a href="Chapter3/BooleanLiteral.sql">BooleanLiteral.sql</a></td>
<td>This script demonstrates Boolean literals.</td>
</tr>
<tr>
<td><a href="Chapter3/Case.sql">Case.sql</a></td>
<td>This script demonstrates CASE.</td>
</tr>
<tr>
<td height="23"><a href="Chapter3/CompileError.sql">CompileError.sql</a></td>
<td>This script demonstrates the compile time warnings generated by Oracle.</td>
</tr>
<tr>
<td><a href="Chapter3/CompileWarning.sql">CompileWarning.sql</a></td>
<td>This script demonstrates the DBMS_WARNING package.</td>
</tr>
<tr>
<td><a href="Chapter3/DateTimeLiteral.sql">DateTimeLiteral.sql</a></td>
<td>This script demonstrates Date/Time literals.</td>
</tr>
<tr>
<td><a href="Chapter3/Goto.sql">Goto.sql</a></td>
<td>This script demonstrates the GOTO command.</td>
</tr>
<tr>
<td><a href="Chapter3/If.sql">If.sql</a></td>
<td>This script demonstrates IF-THEN, IF-THEN-ELSE, and IF-THEN-ELSIF.</td>
</tr>
<tr>
<td><a href="Chapter3/Interval.sql">Interval.sql</a></td>
<td>This script demonstrates the use of the INTERVAL types.</td>
</tr>
<tr>
<td><a href="Chapter3/Loop.sql">Loop.sql</a></td>
<td>This script demonstrates LOOPs.</td>
</tr>
<tr>
<td><a href="Chapter3/MultiLineComment.sql">MultiLineComment.sql</a></td>
<td>This script demonstrates the use of multi-line comment blocks.</td>
</tr>
<tr>
<td><a href="Chapter3/NamedBlock.sql">NamedBlock.sql</a></td>
<td>This script demonstrates the structure of a named block.</td>
</tr>
<tr>
<td><a href="Chapter3/NestedBlock.sql">NestedBlock.sql</a></td>
<td>This script demonstrates a nested block.</td>
</tr>
<tr>
<td><a href="Chapter3/Number.sql">Number.sql</a></td>
<td>This script demonstrates the NUMBER datatype.</td>
</tr>
<tr>
<td><a href="Chapter3/PLSQL_Warnings.sql">PLSQL_Warnings.sql</a></td>
<td>This script demonstrates the PLSQL_WARNINGS parameter.</td>
</tr>
<tr>
<td><a href="Chapter3/Ref_Cursor.sql">Ref_Cursor.sql</a></td>
<td>This script demonstrates the use of REF CURSOR.</td>
</tr>
<tr>
<td><a href="Chapter3/Reserved.sql">Reserved.sql</a></td>
<td>This script prints a list of reserved words.</td>
</tr>
<tr>
<td><a href="Chapter3/SingleLineComment.sql">SingleLineComment.sql</a></td>
<td>This script demonstrates the use of single line comments.</td>
</tr>
<tr>
<td height="23"><a href="Chapter3/StringLiteral.sql">StringLiteral.sql</a></td>
<td>This script demonstrates the different ways in which 10g handles apostrophes.</td>
</tr>
<tr>
<td><a href="Chapter3/Timestamp.sql">Timestamp.sql</a></td>
<td>This script demonstrates the TIMESTAMP datatypes.</td>
</tr>
<tr>
<td><a href="Chapter3/Trigger.sql">Trigger.sql</a></td>
<td>This script demonstrates the use of a trigger.</td>
</tr>
<tr>
<td height="23"><a href="Chapter3/Variables.sql">Variables.sql</a></td>
<td>This script declares a variable as a constant then attempts to change
the assigned value.</td>
</tr>
<tr>
<td><a href="Chapter3/Visibility.sql">Visibility.sql</a></td>
<td>This script demonstrates variable visibility.</td>
</tr>
<tr>
<td><a href="Chapter3/WhiteSpace.sql">WhiteSpace.sql</a></td>
<td>This script demonstrates shows poor design when white space is not used.</td>
</tr>
<tr>
<td><a href="Chapter3/WrapAfter.plb">WrapAfter.plb</a></td>
<td>This file shows what a wrapped file looks like.</td>
</tr>
<tr>
<td><a href="Chapter3/WrapBefore.sql">WrapBefore.sql</a></td>
<td>This file is used in the example showing how to wrap PL/SQL.</td>
</tr>
<tr>
<td><a href="Chapter3/WrapSeed.sql">WrapSeed.sql</a></td>
<td>This script demonstrates the Wrap utility.</td>
</tr>
</table>
<h4><a name="CH4"></a>Chapter 4: Using SQL with PL/SQL</h4>
<table width="100%" border="1">
<tr>
<td width="29%"><a href="Chapter4/CreateUser.sql">CreateUser.sql</a></td>
<td width="71%">This script creates the plsql user for chapter 4 examples.
You must run this script as SYS or SYSTEM as SYSDBA. The script can be rerun.</td>
</tr>
<tr>
<td><a href="Chapter4/Autonomous.sql">Autonomous.sql</a></td>
<td>This script demonstrates how autonomous transactions work.</td>
</tr>
<tr>
<td><a href="Chapter4/BasicSelect.sql">BasicSelect.sql</a></td>
<td>This script demonstrates how to use a basic select statement in a PL/SQL
block. </td>
</tr>
<tr>
<td><a href="Chapter4/ContextArea1.sql">ContextArea1.sql</a></td>
<td>This script shows how cursors work with the context area, and remain consistent
after opened.</td>
</tr>
<tr>
<td><a href="Chapter4/ContextArea2.sql">ContextArea2.sql</a></td>
<td>This script demonstrates how changes to the database impact processing
of records after a cursor is opened.</td>
</tr>
<tr>
<td><a href="Chapter4/Conversion.sql">Conversion.sql</a></td>
<td>This script demonstrates the TO_CHAR and TO_DATE conversion functions.</td>
</tr>
<tr>
<td><a href="Chapter4/CursorForLoop.sql">CursorForLoop.sql</a></td>
<td>This script demonstrates the use of the Cursor For Loop.</td>
</tr>
<tr>
<td><a href="Chapter4/CursorSubquery.sql">CursorSubquery.sql</a></td>
<td>This script demonstrates the use of the cursor subquery.</td>
</tr>
<tr>
<td><a href="Chapter4/CursorVariable1.sql">CursorVariable1.sql</a></td>
<td>This script demonstrates the use of REF CURSOR.</td>
</tr>
<tr>
<td><a href="Chapter4/CursorVariable2.sql">CursorVariable2.sql</a></td>
<td>This script demonstrates the use of SYS_REFCURSOR.</td>
</tr>
<tr>
<td><a href="Chapter4/DateTime.sql">DateTime.sql</a></td>
<td>This script demonstrates a few date functions.</td>
</tr>
<tr>
<td><a href="Chapter4/DDL.sql">DDL.sql</a></td>
<td>This script demonstrates how DDL doesn't work with PL/SQL.</td>
</tr>
<tr>
<td><a href="Chapter4/Delete.sql">Delete.sql</a></td>
<td>This script demonstrates how DELETEs work with PL/SQL.</td>
</tr>
<tr>
<td><a href="Chapter4/Error.sql">Error.sql</a></td>
<td>This script demonstrates error functions SQLERRM and SQLCODE.</td>
</tr>
<tr>
<td><a href="Chapter4/ExplicitAttribute.sql">ExplicitAttribute.sql</a></td>
<td>This script demonstrates the use of cursor attributes.</td>
</tr>
<tr>
<td><a href="Chapter4/GreatestLeast.sql">GreatestLeast.sql</a></td>
<td>This script demonstrates the Greatest and Least functions.</td>
</tr>
<tr>
<td><a href="Chapter4/ImplicitAttribute.sql">ImplicitAttribute.sql</a></td>
<td>This script demonstrates the use of cursor attributes.</td>
</tr>
<tr>
<td><a href="Chapter4/Insert.sql">Insert.sql</a></td>
<td>This script demonstrates how INSERTs work with PL/SQL.</td>
</tr>
<tr>
<td height="23"><a href="Chapter4/Level.sql">Level.sql</a></td>
<td>This script shows the pseudocolumn LEVEL and an example of using the levels.
</td>
</tr>
<tr>
<td><a href="Chapter4/LevelUpdate.sql">LevelUpdate.sql</a></td>
<td>This script shows the pseudocolumn LEVEL and an example of using the levels
with an update. </td>
</tr>
<tr>
<td><a href="Chapter4/Like.sql">Like.sql</a></td>
<td>This script demonstrates the use of the LIKE operator.</td>
</tr>
<tr>
<td><a href="Chapter4/LockSession1.sql">LockSession1.sql</a></td>
<td>This script demonstrates how transactions use locks, commits, and rollbacks.
This script is for the first session as noted in the book.</td>
</tr>
<tr>
<td><a href="Chapter4/LockSession2.sql">LockSession2.sql</a></td>
<td>This script demonstrates how transactions use locks, commits, and rollbacks.
This script is for the second session as noted in the book.</td>
</tr>
<tr>
<td><a href="Chapter4/Lower.sql">Lower.sql</a></td>
<td>This script demonstrates the LOWER function.</td>
</tr>
<tr>
<td><a href="Chapter4/NDS.sql">NDS.sql</a></td>
<td>This script demonstrates how NDS works with PL/SQL.</td>
</tr>
<tr>
<td><a href="Chapter4/OpenCursor.sql">OpenCursor.sql</a></td>
<td>This script demonstrates what happens when the number of cursors opened
exceeds the open_cursors value. For this example, set the value of open_cursors
to 20 in the init.ora file.</td>
</tr>
<tr>
<td><a href="Chapter4/RegexpLike.sql">RegexpLike.sql</a></td>
<td>This script demonstrates the use of the REGEXP_LIKE function.</td>
</tr>
<tr>
<td><a href="Chapter4/Round.sql">Round.sql</a></td>
<td>This script demonstrates the ROUND function.</td>
</tr>
<tr>
<td><a href="Chapter4/RowID.sql">RowID.sql</a></td>
<td>This script demonstrates the use of the rowid pseudo column.</td>
</tr>
<tr>
<td><a href="Chapter4/Savepoint.sql">Savepoint.sql</a></td>
<td>This script demonstrates how transactions use savepoints.</td>
</tr>
<tr>
<td><a href="Chapter4/SimpleLoop.sql">SimpleLoop.sql</a></td>
<td>This script shows how simple loops are written.</td>
</tr>
<tr>
<td><a href="Chapter4/TextIndex.sql">TextIndex.sql</a></td>
<td>This script demonstrates indexing using Oracle Text.</td>
</tr>
<tr>
<td><a href="Chapter4/Update.sql">Update.sql</a></td>
<td>This script demonstrates how UPDATEs work with PL/SQL.</td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -