<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-34485195</id><updated>2011-12-14T18:56:17.951-08:00</updated><title type='text'>PL/SQL Tutorials</title><subtitle type='html'>PL/SQL Tutorials covers PL/SQL Introduction, PL/SQL Cursors, PL/SQL Triggers, PL/SQL Interview Questions</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://plsql-tutorials.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34485195/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://plsql-tutorials.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>sachin</name><uri>http://www.blogger.com/profile/18179031600042779605</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-34485195.post-115835127534103667</id><published>2006-10-26T13:14:00.000-07:00</published><updated>2007-03-09T00:35:00.411-08:00</updated><title type='text'>PL/SQL Introduction</title><content type='html'>&lt;div align="left"&gt;&lt;br /&gt;&lt;p&gt;This tutorial covers &lt;b&gt;PL/SQL&lt;/b&gt; &lt;b&gt;datatypes&lt;/b&gt;, &lt;b&gt;PL/SQL&lt;/b&gt; variables, &lt;b&gt;PL/SQL&lt;/b&gt; constants, &lt;b&gt;PL/SQL&lt;/b&gt; collections, &lt;b&gt;PL/SQL&lt;/b&gt; cursors, procedures, functions and packages and much more in best of its form. You will love to read the content of this tutorial. It is an ever increasing tutorial. I will keep on adding more &lt;b&gt;PL/SQL&lt;/b&gt; content from time to time.&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;PL/SQL Block Structure&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;Below is the basic structure of the &lt;b&gt;PL/SQL&lt;/b&gt; program:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Set serveroutput on&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Declare&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Var1 varchar2(20);&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Begin&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Var1 := "Hello World";&lt;br /&gt;&lt;br /&gt;Dbms_output.put_line(var1);&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Exception&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;When others then&lt;br /&gt;&lt;br /&gt;Dbms_output.put_line(‘It is an exception’);&lt;br /&gt;&lt;br /&gt;&lt;b&gt;End;&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;In the declaration section all the variables and constants are defined.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;In &lt;b&gt;PL/SQL&lt;/b&gt; all the errors are handled in the Exception block.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Begin and End are mandatory statements indicating the begin and end of the &lt;b&gt;PL/SQL&lt;/b&gt; Block.&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;DECLARING VARIABLES AND CONSTANTS:&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt;Example of declaraing variables:&lt;/h4&gt;&lt;br /&gt;Var1          varchar2(100);&lt;br /&gt;&lt;br /&gt;Hire_date  Date;&lt;br /&gt;&lt;br /&gt;Var2           number    default 5;&lt;br /&gt;&lt;br /&gt;Var3           number    not null := 2;&lt;br /&gt;&lt;br /&gt;Not null means a value may change but it can never be assigned Null.&lt;br /&gt;&lt;br /&gt;Var4   varchar2(20) := Null;&lt;br /&gt;&lt;br /&gt;Var5    varchar2(20) default Null;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Constants:&lt;/h3&gt;&lt;br /&gt;Var_constant constant number := 100;&lt;br /&gt;&lt;p&gt;Constants cannot be changed.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;You must initialize constants at the time of declaration..&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;%TYPE and %ROWTYPE&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;%TYPE&lt;/b&gt;  is used to declare a variable that is of the same type as a specified table’s column.&lt;/p&gt;&lt;br /&gt;Emp_number  emp.empno%type;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;%ROWTYPE&lt;/b&gt; is used to declare a record(variable that represents the entire row of a table).&lt;/p&gt;&lt;br /&gt;Emp_record  emp%rowtype;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Another example of declaraing variable:&lt;/p&gt;&lt;br /&gt;Declare&lt;br /&gt;&lt;br /&gt;Name   varchar2(30);&lt;br /&gt;&lt;br /&gt;Select ename into name from emp where empno = 20;&lt;br /&gt;&lt;br /&gt;Begin&lt;br /&gt;&lt;br /&gt;Null;&lt;br /&gt;&lt;br /&gt;End;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Any DML statements should be after Begin statement;&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;Begin&lt;br /&gt;&lt;br /&gt;     Delete from emp where empno = 29;&lt;br /&gt;&lt;br /&gt;     Commit;&lt;br /&gt;&lt;br /&gt;End;&lt;br /&gt;&lt;h3&gt;PL/SQL Collections&lt;/h3&gt;&lt;br /&gt; &lt;li&gt;Records&lt;/li&gt;&lt;br /&gt; &lt;li&gt;PL/SQL tables&lt;/li&gt;&lt;br /&gt; &lt;li&gt;Varrays&lt;/li&gt;&lt;br /&gt; &lt;li&gt;Nested Tables&lt;/li&gt;&lt;br /&gt;&lt;h3&gt;Records:&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;It is a collection of variables:&lt;/p&gt;&lt;br /&gt;Type my_first_record is record (&lt;br /&gt;&lt;br /&gt;Name  varchar2(20);&lt;br /&gt;&lt;br /&gt;Age  number;&lt;br /&gt;&lt;br /&gt;Salary  number;&lt;br /&gt;&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;Var_of_myfirstrecord  my_first_record;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;PL/SQL Tables&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;These are one dimensional  arrays and are indexed by integers.&lt;/p&gt;&lt;br /&gt;&lt;h4&gt;Example:&lt;/h4&gt;&lt;br /&gt; &lt;p&gt;Type my_first_table is table of varchar2(10)&lt;br /&gt;&lt;br /&gt;Index by binary_integer;&lt;/p&gt;&lt;br /&gt;Var_of_table   my_first_table;&lt;br /&gt;&lt;br /&gt;Var_of_table(1) := ‘hello world’;&lt;br /&gt;&lt;br /&gt;Var_of_table(2) := ‘bye’;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Example:&lt;/h4&gt;&lt;br /&gt;Type my_emp_table is table of emp%rowtype&lt;br /&gt;&lt;br /&gt;Index by binary_integer:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Var_of_emp   my_emp_table;&lt;br /&gt;&lt;br /&gt;Var1_of_emp   my_emp_table;&lt;br /&gt;&lt;br /&gt;Var_of_emp(1).ename := ‘sachin’;&lt;br /&gt;&lt;br /&gt;Var_of_emp(1).empno := 20;&lt;br /&gt;&lt;br /&gt;Var_of_emp(1).sal := 3000;&lt;br /&gt;&lt;p&gt;To delete individual records:&lt;/p&gt;&lt;br /&gt;Var_of_emp .delete(1);&lt;br /&gt;&lt;p&gt;To remove all entries from a table:&lt;/p&gt;&lt;br /&gt;Var_of_emp.delete;&lt;br /&gt;&lt;br /&gt;Or&lt;br /&gt;&lt;br /&gt;Var_of_emp :=  var1_of_emp&lt;br /&gt;&lt;br /&gt;Where var1_of_emp  does not contain any value, it is empty.&lt;br /&gt;&lt;p&gt;&lt;b&gt;COUNT&lt;/b&gt; method can be used to return number of records in a PL/SQL Table.&lt;/p&gt;&lt;br /&gt;Var_of_table.count&lt;br /&gt;&lt;p&gt;First, Next and Last methods of PL/SQL Tables.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;First is for first index in the PL/SQL Tables.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Last is for last index in the PL/SQL Tables.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Next is for next index in the PL/SQL Tables.&lt;/p&gt;&lt;br /&gt;&lt;h4&gt;Example:&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;SQL&gt; set serveroutput on&lt;br /&gt;&lt;br /&gt;SQL&gt; Declare&lt;br /&gt;&lt;br /&gt; 2 &lt;br /&gt;&lt;br /&gt; 3  Type my_dept_table is table of  varchar2(20)&lt;br /&gt;&lt;br /&gt; 4  Index by binary_integer;&lt;br /&gt;&lt;br /&gt; 5 &lt;br /&gt;&lt;br /&gt; 6  Var_of_dept   my_dept_table;&lt;br /&gt;&lt;br /&gt; 7  Index_value  number;&lt;br /&gt;&lt;br /&gt; 8 &lt;br /&gt;&lt;br /&gt; 9  Begin&lt;br /&gt;&lt;br /&gt;10 &lt;br /&gt;&lt;br /&gt;11  For dept_rec in (select * from dept) loop&lt;br /&gt;&lt;br /&gt;12  Var_of_dept(dept_rec.deptno) := dept_rec.dname;&lt;br /&gt;&lt;br /&gt;13  End loop;&lt;br /&gt;&lt;br /&gt;14 &lt;br /&gt;&lt;br /&gt;15  Index_value := var_of_dept.first;&lt;br /&gt;&lt;br /&gt;16  Loop&lt;br /&gt;&lt;br /&gt;17  Exit when index_value is null;&lt;br /&gt;&lt;br /&gt;18  Dbms_output.put_line (index_value || ' ' ||var_of_dept(index_value));&lt;br /&gt;&lt;br /&gt;19  Index_value := var_of_dept.next(index_value);&lt;br /&gt;&lt;br /&gt;20  End loop;&lt;br /&gt;&lt;br /&gt;21  End;&lt;br /&gt;&lt;br /&gt;22  /&lt;br /&gt;&lt;br /&gt;10 ACCOUNTING&lt;br /&gt;&lt;br /&gt;20 RESEARCH&lt;br /&gt;&lt;br /&gt;30 SALES&lt;br /&gt;&lt;br /&gt;40 OPERATIONS&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;PL/SQL&lt;/b&gt; procedure successfully completed.&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;Varrays:&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;These can be stored in the columns of your tables. When you create them you  must provide the maximum size for them. These are dense and Not sparse, which means there is no way to delete individual elements of a varrays.&lt;/p&gt;&lt;br /&gt;&lt;h4&gt;Example:&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Create type project_work_type as varray(20) of  varchar2(30);&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Create table student_projects(&lt;br /&gt;&lt;br /&gt;Name  varchar2(20),&lt;br /&gt;&lt;br /&gt;Id  number,&lt;br /&gt;&lt;br /&gt;--each student can have upto 20 projects&lt;br /&gt;&lt;br /&gt;Projects project_work_type,&lt;br /&gt;&lt;br /&gt;);&lt;/p&gt;&lt;br /&gt;&lt;h4&gt;Example:&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Create type emp_type as object(&lt;br /&gt;&lt;br /&gt;Id number,&lt;br /&gt;&lt;br /&gt;Name varchar2(20)&lt;br /&gt;&lt;br /&gt;);&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Create type emp_varray_type as varray(5) of emp_type;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Create table t1(&lt;br /&gt;&lt;br /&gt;T1_id  number,&lt;br /&gt;&lt;br /&gt;T1_name varchar2(10),&lt;br /&gt;&lt;br /&gt;Employee emp_varray_type);&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Insert into t1(t1_id, t1_name, employee)&lt;br /&gt;&lt;br /&gt;Values (1, ’one’,emp_varray_type( emp_type(1,’a’),&lt;br /&gt;&lt;br /&gt;            Emp_type(2,’b’))&lt;br /&gt;&lt;br /&gt;)&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;Nested Tables&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;These are similar to index by table but these can be stored in database columns but index by tables cannot be stored in database columns.&lt;/p&gt;&lt;br&gt;&lt;br /&gt;&lt;p align="center"&gt;&lt;a href="http://plsql-tutorials.blogspot.com/2007/03/plsql-sitemap.html"&gt;PL/SQL Sitemap&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="http://plsql-tutorials.blogspot.com/2007/02/plsql-resources.html"&gt;PL/SQL Resources&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;http://plsql-tutorials.blogspot.com/
http://plsql-tutorials.blogspot.com/2006/10/plsql-introduction.html
http://plsql-tutorials.blogspot.com/2006/10/plsql-cursors.html
http://plsql-tutorials.blogspot.com/2006/10/plsql-triggers.html
http://plsql-tutorials.blogspot.com/2006/10/plsql-interview-questions.html
http://plsql-tutorials.blogspot.com/2007/03/plsql-sitemap.html
http://plsql-tutorials.blogspot.com/2007/02/plsql-resources.html&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34485195-115835127534103667?l=plsql-tutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plsql-tutorials.blogspot.com/feeds/115835127534103667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34485195&amp;postID=115835127534103667' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34485195/posts/default/115835127534103667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34485195/posts/default/115835127534103667'/><link rel='alternate' type='text/html' href='http://plsql-tutorials.blogspot.com/2006/10/plsql-introduction.html' title='PL/SQL Introduction'/><author><name>sachin</name><uri>http://www.blogger.com/profile/18179031600042779605</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34485195.post-116184531521870144</id><published>2006-10-25T23:47:00.000-07:00</published><updated>2007-03-09T00:35:54.613-08:00</updated><title type='text'>PL/SQL Interview Questions</title><content type='html'>&lt;div align="left"&gt; &lt;br /&gt;&lt;h3&gt;SQl PL/SQL Question 1&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt; How to display row number with records?&lt;/h4&gt;&lt;br /&gt; &lt;p&gt;Select rownum, ename from emp;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;SQl PL/SQL Question 2&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt;How to view version information in Oracle?&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Select banner from v$version;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;SQl PL/SQL Question 3&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt;How to find the second highest salary in emp table? &lt;/h4&gt;&lt;br /&gt;&lt;p&gt;select min(sal) from emp a&lt;br&gt;&lt;br /&gt;where &lt;br /&gt;1 =&lt;br /&gt; (select  count(*) from emp b where a.sal &amp;lt;  b.sal) ;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;SQl PL/SQL Question 4&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt;How to delete the duplicate rows from a table?&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;create table t1 ( col1 int, col2 int, col3 char(1) );&lt;br&gt;&lt;br /&gt;&lt;br /&gt;insert into t1 values(1,50, ‘a’);&lt;br&gt;&lt;br /&gt;insert into t1 values(1,50, ‘b’);&lt;br&gt;&lt;br /&gt;insert into t1 values(1,89, ‘x’);&lt;br&gt;&lt;br /&gt;insert into t1 values(1,89, ‘y’);&lt;br&gt;&lt;br /&gt;insert into t1 values(1,89, ‘z’);&lt;br&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;select * from t1;&lt;/p&gt;&lt;br /&gt;&lt;table width="10%"&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;th valign="top"&gt;Col1&lt;/th&gt;&lt;br /&gt;&lt;th&gt;Col2&lt;/th&gt;&lt;br /&gt;&lt;th&gt;Col2&lt;/th&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;1&lt;/td&gt;&lt;br /&gt;&lt;td&gt;50&lt;/td&gt;&lt;br /&gt;&lt;td&gt;a&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;1&lt;/td&gt;&lt;br /&gt;&lt;td&gt;50&lt;/td&gt;&lt;br /&gt;&lt;td&gt;b&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;2&lt;/td&gt;&lt;br /&gt;&lt;td&gt;89&lt;/td&gt;&lt;br /&gt;&lt;td&gt;x&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;2&lt;/td&gt;&lt;br /&gt;&lt;td&gt;89&lt;/td&gt;&lt;br /&gt;&lt;td&gt;y&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;2&lt;/td&gt;&lt;br /&gt;&lt;td&gt;89&lt;/td&gt;&lt;br /&gt;&lt;td&gt;z&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;delete from T1&lt;br&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;where     rowid &amp;lt;&amp;gt;  ( select max(rowid)&lt;br&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;            from t1 b&lt;br&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;                       where b.col1 = t1.col1&lt;br&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;                        and b.col2 = t1.col2 )&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;3 rows deleted.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;select * from t1;&lt;/p&gt;&lt;br /&gt;&lt;table width="10%"&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;th&gt;Col1&lt;/th&gt;&lt;br /&gt;&lt;th&gt;Col2&lt;/th&gt;&lt;br /&gt;&lt;th&gt;Col2&lt;/th&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;1&lt;/td&gt;&lt;br /&gt;&lt;td&gt;50&lt;/td&gt;&lt;br /&gt;&lt;td&gt;a&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;2&lt;/td&gt;&lt;br /&gt;&lt;td&gt;89&lt;/td&gt;&lt;br /&gt;&lt;td&gt;z&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;will do it. &lt;br /&gt;&lt;br /&gt;&lt;h3&gt;SQl PL/SQL Question 5&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt;How to select a row using indexes? &lt;/h4&gt;&lt;br /&gt;&lt;p&gt;You have to specify the indexed columns in the WHERE clause of query.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;SQl PL/SQL Question 6&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt;How to select  the first 5 characters of FIRSTNAME column of  EMP table? &lt;/h4&gt;&lt;br /&gt;&lt;p&gt;select substr(firstname,1,5) from emp&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;SQl PL/SQL Question 7&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt;How to concatenate the firstname and lastname from emp table? &lt;/h4&gt;&lt;br /&gt;&lt;p&gt;select firstname || ‘ ‘ || lastname from emp&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;SQl PL/SQL Question 8&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt;What's the difference between a primary key and a unique key? &lt;/h4&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Primary key&lt;/b&gt; does not allow nulls, &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Unique key&lt;/b&gt; allow nulls.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;SQl PL/SQL Question 9&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt;What is a self join? &lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;A self join joins a table to itself.&lt;/p&gt;&lt;br /&gt;&lt;h4&gt;Example&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;SELECT a.last_name Employee, b.last_name Manager&lt;br&gt;&lt;br /&gt;FROM employees a, employees b&lt;br&gt;&lt;br /&gt;WHERE b.employee_id = a.manager_id;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;SQl PL/SQL Question 10&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt;What is a transaction and ACID? &lt;/h4&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Transaction&lt;/b&gt; - A transaction is a logical unit of work. It must be commited or rolled back.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;ACID&lt;/b&gt; - Atomicity, Consistency, Isolation and Duralbility, these are properties of a transaction.&lt;/p&gt;&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;SQl PL/SQL Question 11&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt;How to add a column to a table? &lt;/h4&gt;&lt;br /&gt;&lt;p&gt;alter table t1 add sal number;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;alter table t1 add middle_name varchar(20);&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;SQl PL/SQL Question 12&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt;Is it possible for a table to have more than one foreign key ?&lt;/h4&gt;&lt;br /&gt;&lt;p&gt; A table can have any number of foreign keys. It can have only one primary key .&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;SQl PL/SQL Question 13&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt;How to display number value in words?&lt;/h4&gt;&lt;br /&gt;&lt;p&gt; SQL&amp;gt; select sal, (to_char(to_date(sal,'j'), 'jsp')) from emp; &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;SQl PL/SQL Question 14&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt;What is candidate key, alternate key, composite key.&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Candidate Key&lt;/b&gt; A candidate key is one that can identify each row of a table uniquely. Generally a candidate key becomes the primary key of the table. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Alternate Key&lt;/b&gt;If the table has more than one candidate key, one of them will become the primary key, and the rest are called alternate keys. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Composite Key:&lt;/b&gt; - A key formed by combining at least two or more columns is called composite key. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;SQl PL/SQL Question 15&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt;What's the difference between DELETE TABLE and TRUNCATE TABLE commands? Explain drop command.&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;ol type="1"&gt;&lt;br /&gt;&lt;li&gt;Both Delete and Truncate will leave the structure of &lt;br /&gt;  the table. Drop will remove the structure also.&lt;br&gt;&lt;br&gt;&lt;br /&gt;&lt;h4&gt;Example&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;If tablename is T1.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;To remove all the rows from a table t1.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Delete t1&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Truncate table t1&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Drop table t1.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Truncate is fast as compared to Delete. DELETE will &lt;br /&gt;  generate undo information, in case of rollback, but TRUNCATE will not.&lt;br&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Full Table scan and index fast scan read data blocks &lt;br /&gt;  up to high water mark and truncate resets high water mark but delete does &lt;br /&gt;  not.So full table scan after Delete will not improve but after truncate it &lt;br /&gt;  will be fast.&lt;br&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Delete is DML. Because truncate is a DDL, it performs &lt;br /&gt;  implicit commit. You cannot rollback a truncate. Any uncommitted DML changes &lt;br /&gt;  will also be committed with the TRUNCATE.&lt;br&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;You cannot specify a WHERE clause in the TRUNCATE &lt;br /&gt;  statement, but you can specify that in Delete.&lt;br&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;When you truncate a table the storage for the table &lt;br /&gt;  and all the indexes can be reset back to its initial size,but a Delete will &lt;br /&gt;  never shrink the size of the a table or its indexes.&lt;br&gt;&lt;br&gt;                                   &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;About Dropping&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Dropping a table removes the data and definition of the table. The indexes, constraints, triggers, and privileges on the table are also dropped. The action of dropping a table cannot be undone. The views, materialized views or other stored programs that reference the table are not dropped but they are marked as invalid.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;SQl PL/SQL Question 16&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt;Explain the difference between a FUNCTION, PROCEDURE and PACKAGE. &lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Procedures and functions are stored in compiled form in database.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Functions take zero or more parameters and return a value. Procedures take zero or more parameters and return no values.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Both functions and procedures can take or return zero or more values through their parameter lists.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Another difference between procedures and functions, other than the return value, is how they are called. Procedures&lt;br /&gt;are called as stand-alone executable statements:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;my_procedure(parameter1,parameter2...);&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Functions can be called anywhere in an valid expression :&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;e.g&lt;br&gt;&lt;br /&gt;&lt;br /&gt;1) &lt;br /&gt;&lt;br /&gt;IF&lt;br /&gt;(tell_salary(empno) &amp;lt;  500 )&lt;br /&gt;THEN …&lt;br /&gt;&lt;br /&gt;2)&lt;br /&gt;var1 := tell_salary(empno);&lt;br /&gt;&lt;br /&gt;3)&lt;br /&gt;DECLARE&lt;br /&gt;var1 NUMBER DEFAULT tell_salary(empno);&lt;br /&gt;BEGIN …&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Packages contain function , procedures and other data structures.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;There are a number of differences between packaged and non-packaged PL/SQL programs. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Package The data in package is persistent for the duration of the user’s&lt;br /&gt;session.The data in package thus exists across commits in the session.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;If you grant  execute privilege on a package, it is for all functions and procedures and data structures&lt;br /&gt;in the package specification. You cannot grant privileges on only one&lt;br /&gt;procedure or function within a package.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;You can overload procedures and functions within a package, declaring multiple programs with the same name. The correct&lt;br /&gt;program to be called is decided at runtime, based on the number or datatypes&lt;br /&gt;of the parameters.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;SQl PL/SQL Question 17&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt;Describe the use of %ROWTYPE and %TYPE in PL/SQL&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;%ROWTYPE  associates a variable to an entire table row. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;The %TYPE associates a variable with a single column type.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;SQl PL/SQL Question 18&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt;What are SQLCODE and SQLERRM and why are they important for PL/SQL developers?&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;SQLCODE  returns the current database error number. These error numbers are all negative, except NO_DATA_FOUND, which returns +100.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;SQLERRM returns the textual error message.. These are used in exception handling.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;SQl PL/SQL Question 19&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt;How can you find within a PL/SQL block, if a cursor is open?&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;By the Use of %ISOPEN cursor variable.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;SQl PL/SQL Question 20&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt;How do you debug output from PL/SQL?&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;By the use the DBMS_OUTPUT package. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;By the use of SHOW ERROR command, but this only shows errors. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;The package UTL_FILE can also be used.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;SQl PL/SQL Question 21&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt;What are the types of triggers?&lt;/h4&gt;&lt;br /&gt;&lt;li&gt;Use Row and Statement Triggers&lt;br /&gt;&lt;li&gt;Use INSTEAD OF Triggers&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;SQl PL/SQL Question 22&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt;Explain the usage of WHERE CURRENT OF clause in cursors ?&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;It refers to the latest row fetched from a cursor in an update and delete statement.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;SQl PL/SQL Question 23&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt;Name the tables where characteristics of Package, procedure and functions are stored ?&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;User_objects, User_Source and User_error.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;SQl PL/SQL Question 24&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt;What are two parts of package ?&lt;/h4&gt;&lt;br /&gt; &lt;p&gt;They consist of  package specification, which contains the function headers, procedure headers, and externally visible data structures.&lt;br /&gt;The package also contains a package body, which contains the declaration, executable, and exception handling sections of all the bundled&lt;br /&gt;procedures and functions.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;SQl PL/SQL Question 25&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt;What are two virtual tables available during database trigger execution ?&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;The table columns are referred as OLD.column_name and NEW.column_name.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;For  INSERT only TRIGGERS  NEW.column_name values ARE only available.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;For  UPDATE only TRIGERS OLD.column_name NEW.column_name values ARE only available.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;For  DELETE only TRIGGERS OLD.column_name values ARE only available.v&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;SQl PL/SQL Question 26&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt;What is Overloading of procedures ?&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;  REPEATING OF SAME PROCEDURE NAME WITH DIFERENT PARAMETER LIST.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;SQl PL/SQL Question 27&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt;What are the return values of functions SQLCODE and SQLERRM ?&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;SQLCODE&lt;/b&gt; returns the latest code of the error that has occurred.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;SQLERRM&lt;/b&gt; returns the relevant error message of the SQLCODE.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;SQl PL/SQL Question 28&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt;Is it possible to use Transaction control Statements such a ROLLBACK or COMMIT in Database Trigger ? Why ?&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;It is not possible.,because of the side effect to transactions.  You can use them indirectly by calling procedures or functions .&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;SQl PL/SQL Question 29&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt;What are the modes of parameters that can be passed to a procedure ?&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;  IN, OUT, IN-OUT parameters.&lt;/p&gt;&lt;/li&gt;&lt;br /&gt;&lt;p align="center"&gt;&lt;a href="http://plsql-tutorials.blogspot.com/2007/03/plsql-sitemap.html"&gt;PL/SQL Sitemap&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="http://plsql-tutorials.blogspot.com/2007/02/plsql-resources.html"&gt;PL/SQL Resources&lt;/a&gt;&lt;/p&gt;&lt;br /&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;http://plsql-tutorials.blogspot.com/
http://plsql-tutorials.blogspot.com/2006/10/plsql-introduction.html
http://plsql-tutorials.blogspot.com/2006/10/plsql-cursors.html
http://plsql-tutorials.blogspot.com/2006/10/plsql-triggers.html
http://plsql-tutorials.blogspot.com/2006/10/plsql-interview-questions.html
http://plsql-tutorials.blogspot.com/2007/03/plsql-sitemap.html
http://plsql-tutorials.blogspot.com/2007/02/plsql-resources.html&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34485195-116184531521870144?l=plsql-tutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plsql-tutorials.blogspot.com/feeds/116184531521870144/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34485195&amp;postID=116184531521870144' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34485195/posts/default/116184531521870144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34485195/posts/default/116184531521870144'/><link rel='alternate' type='text/html' href='http://plsql-tutorials.blogspot.com/2006/10/plsql-interview-questions.html' title='PL/SQL Interview Questions'/><author><name>sachin</name><uri>http://www.blogger.com/profile/18179031600042779605</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34485195.post-116184481872869621</id><published>2006-10-25T23:39:00.000-07:00</published><updated>2007-03-09T00:30:54.665-08:00</updated><title type='text'>PL/SQL Triggers</title><content type='html'>&lt;div align="left"&gt; &lt;br /&gt;&lt;h3&gt;Database Trigger&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;A &lt;b&gt;database trigger&lt;/b&gt; is a block of code that is automatically executed in response to certain events. &lt;b&gt;Triggers&lt;/b&gt; are executed implicitly whenever the triggering event happens. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;The triggering event is either a INSERT, DELETE, or UPDATE command. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;The timing can be either BEFORE or AFTER, INSTEAD OF trigger&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The &lt;b&gt;trigger&lt;/b&gt; can be either row-level or statement-level, where the former fires once for each row affected by the triggering statement and the latter fires once for the whole statement.&lt;/p&gt;&lt;br /&gt;&lt;h4&gt;Example&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Example of creating a &lt;b&gt;trigger&lt;/b&gt; based on the following two tables: &lt;/p&gt;&lt;br /&gt;&lt;p&gt;CREATE TABLE T1 (a INTEGER);&lt;br&gt;&lt;br /&gt;CREATE TABLE T2 (b INTEGER);&lt;br&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;We will create a &lt;b&gt;trigger&lt;/b&gt; that may insert a tuple into T2 when a tuple is inserted into T1. The &lt;b&gt;trigger&lt;/b&gt; checks if  the inserted row in T1 is has a value less than 5 only then a tuple is inserted in T2. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;CREATE TRIGGER tr1&lt;br&gt;&lt;br /&gt;    AFTER INSERT ON T1&lt;br&gt;&lt;br /&gt;    REFERENCING NEW AS newRow&lt;br&gt;&lt;br /&gt;    FOR EACH ROW&lt;br&gt;&lt;br /&gt;    WHEN (newRow.a &lt;= 5)&lt;br&gt;&lt;br /&gt;    BEGIN&lt;br&gt;&lt;br /&gt;        INSERT INTO T2 VALUES(:newRow.a);&lt;br&gt;&lt;br /&gt;    END tr1;&lt;br&gt;&lt;br /&gt;run;&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;Displaying &lt;b&gt;Trigger&lt;/B&gt; Errors&lt;/h3&gt;&lt;br /&gt;If we get a message &lt;br&gt;&lt;br /&gt;Warning: &lt;b&gt;trigger&lt;/b&gt; created with compilation errors.&lt;br&gt;&lt;br /&gt;you can check the error messages with: &lt;br&gt;&lt;br /&gt;show errors &lt;b&gt;trigger&lt;/b&gt; &lt;name_of_trigger&gt;;&lt;br&gt;&lt;br /&gt;&lt;p&gt;You can also type, SHO ERR (SHOW ERRORS) to see the most recent compilation error. &lt;/p&gt;&lt;br /&gt;&lt;h3&gt;Viewing Defined &lt;b&gt;Triggers&lt;/B&gt;&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;To view  all the defined &lt;b&gt;triggers&lt;/b&gt;, use: &lt;br&gt;&lt;br /&gt;select name_of_trigger from user_triggers; &lt;br&gt;&lt;br /&gt;For more details on a particular &lt;b&gt;trigger&lt;/b&gt;: &lt;br&gt;&lt;br /&gt;select trigger_type, triggering_event, table_name, referencing_names, trigger_body&lt;br&gt;&lt;br /&gt;from user_triggers&lt;br&gt;&lt;br /&gt;where trigger_name = '&lt; name_of_trigger &gt;';&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;Disabling &lt;b&gt;Triggers&lt;/b&gt;s&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;To disable or enable a trigger: &lt;br&gt;&lt;br /&gt;alter trigger &lt; name_of_trigger &gt; {disable|enable};&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;Mutating Table Errors&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Permissions&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;For creating &lt;b&gt;triggers&lt;/b&gt; you should have create &lt;b&gt;trigger&lt;/b&gt; privilege :&lt;/p&gt;&lt;br /&gt;&lt;h4&gt;Example&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Grant create &lt;b&gt;trigger&lt;/b&gt; to John;&lt;br&gt;&lt;br /&gt;Sample table:&lt;br&gt;&lt;br /&gt;create table t1 (&lt;br&gt;&lt;br /&gt;id int,&lt;br&gt;&lt;br /&gt;name varchar(10),&lt;br&gt;&lt;br /&gt;primary key(id)&lt;br&gt;&lt;br /&gt;);&lt;br&gt;&lt;p&gt;&lt;br /&gt;&lt;p&gt;Before insert &lt;b&gt;trigger&lt;/b&gt;:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Create or replace&lt;br&gt;&lt;br /&gt;Trigger tr1&lt;br&gt;&lt;br /&gt;Before &lt;br&gt;&lt;br /&gt;Insert&lt;br&gt;&lt;br /&gt;On t1&lt;br&gt;&lt;br /&gt;For each row&lt;br&gt;&lt;br /&gt;Begin&lt;br&gt;&lt;br /&gt;Dbms_output.put_line(’before insert of ’ || :new.name);&lt;br&gt;&lt;br /&gt;End;&lt;br&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;We will insert some data to see if our &lt;b&gt;triggers&lt;/b&gt; work or not:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;insert into t1(id,name) values (1,’sam’);&lt;br&gt;&lt;br /&gt;Result:&lt;br&gt;&lt;br /&gt;before insert of  sam&lt;/p&gt;&lt;br /&gt;&lt;p&gt;After insert trigger:&lt;br&gt;&lt;br /&gt;Create or replace&lt;br&gt;&lt;br /&gt;Trigger tr1&lt;br&gt;&lt;br /&gt;After&lt;br&gt;&lt;br /&gt;Insert&lt;br&gt;&lt;br /&gt;On t1&lt;br&gt;&lt;br /&gt;For each row&lt;br&gt;&lt;br /&gt;Begin&lt;br&gt;&lt;br /&gt;Dbms_output.put_line(’After insert of ’ || :new.name);&lt;br&gt;&lt;br /&gt;End;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;We will insert some data to see if our triggers work or not:&lt;/p&gt;&lt;br /&gt;insert into t1(id,name) values (1,’sam’);&lt;br&gt;&lt;br /&gt;Result:&lt;br&gt;&lt;br /&gt;After insert of  sam&lt;br&gt;&lt;br /&gt;Before Update Statement Trigger:&lt;br&gt;&lt;br /&gt;create or replace&lt;br&gt;&lt;br /&gt;trigger tr1&lt;br&gt;&lt;br /&gt;before update&lt;br&gt;&lt;br /&gt;on t1&lt;br&gt;&lt;br /&gt;begin&lt;br&gt;&lt;br /&gt;dbms_output.put_line(’before updating some names(s)’);&lt;br&gt;&lt;br /&gt;end;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;create or replace&lt;br&gt;&lt;br /&gt;trigger tr1&lt;br&gt;&lt;br /&gt;before update&lt;br&gt;&lt;br /&gt;on t1&lt;br&gt;&lt;br /&gt;for each row&lt;br&gt;&lt;br /&gt;begin&lt;br&gt;&lt;br /&gt;dbms_output.put_line(’before updating ’ ||&lt;br&gt;&lt;br /&gt; (:old.name) || ’ to ’ ||&lt;br&gt;&lt;br /&gt;to_char(:new.name));&lt;br&gt;&lt;br /&gt;end;&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;IF statements&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;create or replace&lt;br&gt;&lt;br /&gt;trigger tr1&lt;br&gt;&lt;br /&gt;before insert or update or delete on t1&lt;br&gt;&lt;br /&gt;for each row&lt;br&gt;&lt;br /&gt;begin&lt;br&gt;&lt;br /&gt;if inserting then&lt;br&gt;&lt;br /&gt;dbms_output.put_line(’inserting : ’ || :new.name);&lt;br&gt;&lt;br /&gt;elsif updating then&lt;br&gt;&lt;br /&gt;dbms_output.put_line(’updating : ’ ||&lt;br&gt;&lt;br /&gt;:old.name || ’ to ’ || :new.name);&lt;br&gt;&lt;br /&gt;elsif deleting then&lt;br&gt;&lt;br /&gt;dbms_output.put_line(’deleting : ’ || :old.name);&lt;br&gt;&lt;br /&gt;end if;&lt;br&gt;&lt;br /&gt;end;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;We will insert some data to see if our triggers work or not:&lt;/p&gt;&lt;br /&gt;insert into t1(id,name) values (1,’sam’);&lt;br&gt;&lt;br /&gt;Result:&lt;br&gt;&lt;br /&gt;inserting : sam&lt;br&gt;&lt;br /&gt;update  t1 set name = ’g’ where name = ’a’;&lt;br&gt;&lt;br /&gt;updating: g to s&lt;br&gt;&lt;br /&gt;&lt;h3&gt;Working with Views&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;we will create a view (of t1 table):&lt;br&gt;&lt;br /&gt;CREATE OR REPLACE&lt;br&gt;&lt;br /&gt;VIEW t1_VIEW AS&lt;br&gt;&lt;br /&gt;SELECT NAME FROM t1;&lt;br&gt;&lt;br /&gt;&lt;p&gt;Now, we know that updating (or inserting) into a view is kind of pointless; however, we can&lt;br /&gt;provide this functionality using a trigger! &lt;/p&gt;&lt;br /&gt;&lt;h4&gt;Example:&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;CREATE OR REPLACE&lt;br&gt;&lt;br /&gt;TRIGGER t1_VIEW_INSERT&lt;br&gt;&lt;br /&gt;INSTEAD OF INSERT ON t1_VIEW&lt;br&gt;&lt;br /&gt;FOR EACH ROW&lt;br&gt;&lt;br /&gt;BEGIN&lt;br&gt;&lt;br /&gt;DBMS_OUTPUT.PUT_LINE(’INSERTING: ’ || :NEW.NAME);&lt;br&gt;&lt;br /&gt;-- we can also do&lt;br&gt;&lt;br /&gt;-- INSERT INTO t1(ID,NAME) VALUES (N,:NEW.NAME);&lt;br&gt;&lt;br /&gt;END;&lt;br&gt;&lt;br /&gt;When we do an insert statement on t1_VIEW:&lt;br&gt;&lt;br /&gt;INSERT INTO t1_VIEW(NAME) VALUES (’ poly’);&lt;br&gt;&lt;br /&gt;Which produces the result:&lt;br&gt;&lt;br /&gt;INSERTING: poly&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The &lt;b&gt;trigger&lt;/b&gt; will be fired when someone will try to insert a value into a VIEW.&lt;/p&gt;&lt;br /&gt;&lt;p align="center"&gt;&lt;a href="http://plsql-tutorials.blogspot.com/2007/03/plsql-sitemap.html"&gt;PL/SQL Sitemap&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="http://plsql-tutorials.blogspot.com/2007/02/plsql-resources.html"&gt;PL/SQL Resources&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;http://plsql-tutorials.blogspot.com/
http://plsql-tutorials.blogspot.com/2006/10/plsql-introduction.html
http://plsql-tutorials.blogspot.com/2006/10/plsql-cursors.html
http://plsql-tutorials.blogspot.com/2006/10/plsql-triggers.html
http://plsql-tutorials.blogspot.com/2006/10/plsql-interview-questions.html
http://plsql-tutorials.blogspot.com/2007/03/plsql-sitemap.html
http://plsql-tutorials.blogspot.com/2007/02/plsql-resources.html&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34485195-116184481872869621?l=plsql-tutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plsql-tutorials.blogspot.com/feeds/116184481872869621/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34485195&amp;postID=116184481872869621' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34485195/posts/default/116184481872869621'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34485195/posts/default/116184481872869621'/><link rel='alternate' type='text/html' href='http://plsql-tutorials.blogspot.com/2006/10/plsql-triggers.html' title='PL/SQL Triggers'/><author><name>sachin</name><uri>http://www.blogger.com/profile/18179031600042779605</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34485195.post-116184023516421534</id><published>2006-10-25T22:19:00.000-07:00</published><updated>2007-03-09T00:31:55.406-08:00</updated><title type='text'>PL/SQL Cursors</title><content type='html'>&lt;div align="left"&gt; &lt;br /&gt;&lt;h3&gt;&lt;b&gt;&lt;i&gt;Implicit Cursors&lt;/i&gt;&lt;/b&gt;&lt;/h3&gt; &lt;br&gt; &lt;br /&gt;&lt;b&gt;&lt;i&gt;Implicit cursors&lt;/i&gt;&lt;/b&gt; are automatically created and used by Oracle every time you issue a select statement in &lt;b&gt;PL/SQL&lt;/b&gt;. If you use an &lt;b&gt;&lt;i&gt;Implicit cursors&lt;/i&gt;&lt;/b&gt;, Oracle will perform the open, fetches, and close for you automatically. &lt;b&gt;&lt;i&gt;Implicit cursors&lt;/i&gt;&lt;/b&gt; are used in statements that return only one row. If the &lt;b&gt;SQL&lt;/b&gt; statement returns more than one row, an error will occur.&lt;br /&gt;&lt;p&gt;In the following &lt;b&gt;PL/SQL&lt;/b&gt; code block, the select statement makes use of an implicit cursor:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Begin&lt;br&gt;&lt;br /&gt; Update emp&lt;br&gt;&lt;br /&gt; Set empno=empno&lt;br&gt;&lt;br /&gt;Where 1=2;&lt;br&gt;&lt;br /&gt;Dbms_output.put_line(sql%rowcount ||'   '|| ' rows are affected by the update statement');&lt;br&gt;&lt;br /&gt;End;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;SELECT SUM (sal) INTO TOTAL&lt;br&gt;&lt;br /&gt;  FROM emp &lt;br&gt;&lt;br /&gt;WHERE depno = 10;&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;Cursor For loops&lt;/h3&gt;&lt;br&gt;&lt;br /&gt;Normally when you use &lt;b&gt;&lt;i&gt;explicit cursors&lt;/i&gt;&lt;/b&gt;, cursors have to be opened, the data has to be fetched, and finally the cursor needs to be closed. A cursor for loop automatically performs the open, fetch, and close procedures, which simplifies your job.&lt;br&gt;&lt;br /&gt;Declare&lt;br&gt;&lt;br /&gt;  Cursor emp_cursor is&lt;br&gt;&lt;br /&gt;  Select empno, ename,sal&lt;br&gt;&lt;br /&gt;  From emp;&lt;br&gt;&lt;br /&gt;  V_emp   emp%RowType;&lt;br&gt;&lt;br /&gt;Begin&lt;br&gt;&lt;br /&gt;  For emp_info IN emp_cursor LOOP&lt;br&gt;&lt;br /&gt;  Dbms_output.put_line ('Employee id : '||emp_info.empno||'Employee&lt;br&gt;&lt;br /&gt;  name : '|| emp_info.ename||'Employee salary :'||emp_info.sal);&lt;br&gt;&lt;br /&gt;  End LOOP;&lt;br&gt;&lt;br /&gt;End;&lt;br&gt;&lt;br /&gt;&lt;h3&gt;&lt;b&gt;&lt;i&gt;Explicit Cursors&lt;/i&gt;&lt;/b&gt;&lt;/h3&gt;&lt;br&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;Explicit cursors&lt;/i&gt;&lt;/b&gt; are created by the programmer, and with these you can do operations on a set of rows, which can be processed one by one. You use &lt;b&gt;&lt;i&gt;explicit cursors&lt;/i&gt;&lt;/b&gt; when you are sure that the SQL statement will return more than one row. You have to declare an &lt;b&gt;&lt;i&gt;explicit cursors&lt;/i&gt;&lt;/b&gt; in the declare section at the beginning of the &lt;b&gt;&lt;i&gt;PL/SQL&lt;/i&gt;&lt;/b&gt; block. Once you declare your cursor, the &lt;b&gt;&lt;i&gt;explicit cursors&lt;/i&gt;&lt;/b&gt; will go through these steps:&lt;br /&gt; &lt;ol&gt;&lt;br /&gt;  &lt;li&gt;Declare. This clause initializes the cursor into memory.&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Open  The previously declared cursor is now open and memory is allotted.&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Fetch  The previously declared and opened cursor can now access data; &lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Close  The previously declared, opened, and fetched cursor is closed , which also releases memory allocation.&lt;/li&gt;&lt;br /&gt; &lt;/ol&gt;&lt;br /&gt;&lt;p&gt;SQL&gt; set serveroutput on;&lt;br&gt;&lt;br /&gt;SQL&gt; Declare&lt;br&gt;&lt;br /&gt;  2    Cursor empcursor(empn in number)&lt;br&gt;&lt;br /&gt;  3  Is select * from emp where empno=empn;&lt;br&gt;&lt;br /&gt;  4  &lt;br&gt;&lt;br /&gt;  5  Empvar emp%rowtype;&lt;br&gt;&lt;br /&gt;  6  Begin&lt;br&gt;&lt;br /&gt;  7  Dbms_output.put_line('Getting records for employee no. 7521');&lt;br&gt;&lt;br /&gt;  8  Open empcursor(7521);&lt;br&gt;&lt;br /&gt;  9  Loop&lt;br&gt;&lt;br /&gt; 10  Fetch empcursor into empvar;&lt;br&gt;&lt;br /&gt; 11  Exit when empcursor%notfound;&lt;br&gt;&lt;br /&gt; 12  Dbms_output.put_line('emp name : ' || empvar.ename);&lt;br&gt;&lt;br /&gt; 13  Dbms_output.put_line('emp salary : ' || empvar.sal);&lt;br&gt;&lt;br /&gt; 14  End loop;&lt;br&gt;&lt;br /&gt; 15  Close empcursor;&lt;br&gt;&lt;br /&gt; 16  End;&lt;br&gt;&lt;br /&gt; 17  /&lt;br&gt;&lt;br /&gt;Getting records for employee no. 7521&lt;br&gt;&lt;br /&gt;emp name : WARD&lt;br&gt;&lt;br /&gt;emp salary : 1250&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;PL/SQL&lt;/b&gt; procedure successfully completed.&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;Cursor Attributes&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;Here are the main cursor attributes:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;%ISOPEN&lt;/b&gt; It returns TRUE if cursor is open, and FALSE if it is not.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;%FOUND&lt;/b&gt; It returns TRUE if the previous FETCH returned a row and FALSE if it did not&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;%NOTFOUND&lt;/b&gt; It returns TRUE if the previous FETCH did not return a row and FALSE if it did.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;%ROWCOUNT&lt;/b&gt; It gives you the number of rows the cursor fetched so far.&lt;/p&gt;&lt;br /&gt;&lt;p align="center"&gt;&lt;a href="http://plsql-tutorials.blogspot.com/2007/03/plsql-sitemap.html"&gt;PL/SQL Sitemap&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="http://plsql-tutorials.blogspot.com/2007/02/plsql-resources.html"&gt;PL/SQL Resources&lt;/a&gt;&lt;br /&gt;  &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;http://plsql-tutorials.blogspot.com/
http://plsql-tutorials.blogspot.com/2006/10/plsql-introduction.html
http://plsql-tutorials.blogspot.com/2006/10/plsql-cursors.html
http://plsql-tutorials.blogspot.com/2006/10/plsql-triggers.html
http://plsql-tutorials.blogspot.com/2006/10/plsql-interview-questions.html
http://plsql-tutorials.blogspot.com/2007/03/plsql-sitemap.html
http://plsql-tutorials.blogspot.com/2007/02/plsql-resources.html&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34485195-116184023516421534?l=plsql-tutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plsql-tutorials.blogspot.com/feeds/116184023516421534/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34485195&amp;postID=116184023516421534' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34485195/posts/default/116184023516421534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34485195/posts/default/116184023516421534'/><link rel='alternate' type='text/html' href='http://plsql-tutorials.blogspot.com/2006/10/plsql-cursors.html' title='PL/SQL Cursors'/><author><name>sachin</name><uri>http://www.blogger.com/profile/18179031600042779605</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34485195.post-5162604800263896682</id><published>2006-09-19T23:48:00.000-07:00</published><updated>2007-03-09T00:27:28.208-08:00</updated><title type='text'>PL/SQL Resources</title><content type='html'>&lt;a alt="sql tutorials" target="_new" href="http://www.sqlzoo.net"&gt;http://www.sqlzoo.net&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;a alt="sql tutorials" target="_new" href="http://www.w3schools.com/sql/default.asp"&gt;http://www.w3schools.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;a alt="sql tutorials" target="_new" href="http://www.1keydata.com/sql/sql.html"&gt;www.1keydata.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;a alt="sql tutorials" target="_new" href="http://www.sql-tutorial.net"&gt;http://sql-tutorial.net&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;a alt="sql tutorials" target="_new" href="www.db.cs.ucdavis.edu/teaching/sqltutorial/"&gt;www.db.cs.ucdavis.edu/teaching/sqltutorial&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;a alt="sql tutorials" target="_new" href="http://asktom.oracle.com"&gt;http://asktom.oracle.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;a alt="sql tutorials" target="_new" href="hhttp://metalink.oracle.com/"&gt;http://metalink.oracle.com/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;a alt="sql tutorials" target="_new" href="http://www.ioug.org/"&gt;http://www.ioug.org/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;a target="_new" href="http://www.123ExchangeLinks.com"&gt;123 Exchange Links&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;a href="http://plsql-tutorials.blogspot.com"&gt;&lt;font face="verdana" size="2"&gt;Pl SQL Tutorials Blog&lt;/font&gt;&lt;/a&gt;&lt;br /&gt;&lt;p align="center"&gt;&lt;a href="http://plsql-tutorials.blogspot.com/2007/03/plsql-sitemap.html"&gt;PL/SQL Sitemap&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;http://plsql-tutorials.blogspot.com/
http://plsql-tutorials.blogspot.com/2006/10/plsql-introduction.html
http://plsql-tutorials.blogspot.com/2006/10/plsql-cursors.html
http://plsql-tutorials.blogspot.com/2006/10/plsql-triggers.html
http://plsql-tutorials.blogspot.com/2006/10/plsql-interview-questions.html
http://plsql-tutorials.blogspot.com/2007/03/plsql-sitemap.html
http://plsql-tutorials.blogspot.com/2007/02/plsql-resources.html&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34485195-5162604800263896682?l=plsql-tutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plsql-tutorials.blogspot.com/feeds/5162604800263896682/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34485195&amp;postID=5162604800263896682' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34485195/posts/default/5162604800263896682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34485195/posts/default/5162604800263896682'/><link rel='alternate' type='text/html' href='http://plsql-tutorials.blogspot.com/2007/02/plsql-resources.html' title='PL/SQL Resources'/><author><name>sachin</name><uri>http://www.blogger.com/profile/18179031600042779605</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34485195.post-3168242125471627379</id><published>2006-01-09T00:08:00.000-08:00</published><updated>2007-03-11T07:48:06.691-07:00</updated><title type='text'>PL/SQL Sitemap</title><content type='html'>PL/SQL Tutorials&lt;br /&gt;&lt;br /&gt;1. PL/SQL Introduction&lt;br /&gt;2. PL/SQL Cursors&lt;br /&gt;3. PL/SQL Triggers&lt;br /&gt;4. PL/SQL Interview Questions&lt;br /&gt;5. PL/SQL Resources&lt;div class="blogger-post-footer"&gt;http://plsql-tutorials.blogspot.com/
http://plsql-tutorials.blogspot.com/2006/10/plsql-introduction.html
http://plsql-tutorials.blogspot.com/2006/10/plsql-cursors.html
http://plsql-tutorials.blogspot.com/2006/10/plsql-triggers.html
http://plsql-tutorials.blogspot.com/2006/10/plsql-interview-questions.html
http://plsql-tutorials.blogspot.com/2007/03/plsql-sitemap.html
http://plsql-tutorials.blogspot.com/2007/02/plsql-resources.html&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34485195-3168242125471627379?l=plsql-tutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://plsql-tutorials.blogspot.com/feeds/3168242125471627379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34485195&amp;postID=3168242125471627379' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34485195/posts/default/3168242125471627379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34485195/posts/default/3168242125471627379'/><link rel='alternate' type='text/html' href='http://plsql-tutorials.blogspot.com/2007/03/plsql-sitemap.html' title='PL/SQL Sitemap'/><author><name>sachin</name><uri>http://www.blogger.com/profile/18179031600042779605</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
