<?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>SQL and PLSQL</title>
	<atom:link href="http://plsql.globinch.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://plsql.globinch.com</link>
	<description>SQL and PLSQL Technology Tips</description>
	<lastBuildDate>Thu, 07 Apr 2011 17:04:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Oracle CURSOR with parameter</title>
		<link>http://plsql.globinch.com/2009/02/02/oracle-cursor-with-parameter/</link>
		<comments>http://plsql.globinch.com/2009/02/02/oracle-cursor-with-parameter/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 13:02:00 +0000</pubDate>
		<dc:creator>globinch-sql-plsql</dc:creator>
				<category><![CDATA[Cursors]]></category>
		<category><![CDATA[Functions]]></category>
		<category><![CDATA[Fundamentals]]></category>
		<category><![CDATA[Key Words]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[SQL Tips]]></category>
		<category><![CDATA[CLOSE cursor]]></category>
		<category><![CDATA[Cursor]]></category>
		<category><![CDATA[Fetch cursor]]></category>
		<category><![CDATA[open cursor]]></category>
		<category><![CDATA[Oracle cursor]]></category>

		<guid isPermaLink="false">http://plsql.globinch.com/?p=77</guid>
		<description><![CDATA[Oracle CURSOR with parameter.Execution of a cursor puts the results of the query into a set of rows called the result set, which can be fetched sequentially or non sequentially.]]></description>
			<content:encoded><![CDATA[<!--S-ButtonZ 1.1.5 Start--><div style="float: left; width: 50px; padding-right: 10px; margin: 0 10px 0 0;">
		<script type="text/javascript">
		<!--
		yahooBuzzArticleHeadline = "Oracle CURSOR with parameter";
		yahooBuzzArticleCategory = "";
		yahooBuzzArticleType = "text";
		yahooBuzzArticleId = "http://plsql.globinch.com/2009/02/02/oracle-cursor-with-parameter/";
		yahooBuzzArticleSummary = "";
		//-->
		</script>
		<script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype="square"> </script></div><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fplsql.globinch.com%2F2009%2F02%2F02%2Foracle-cursor-with-parameter%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fplsql.globinch.com%2F2009%2F02%2F02%2Foracle-cursor-with-parameter%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Execution of a <a href="http://plsql.globinch.com/2009/02/02/cursor-oracle-plsql-cursors-and-example/" target="_self">cursor </a>puts the results of the query into a set of rows called the result set, which can be fetched sequentially or non sequentially.<br />
You can create <a href="http://plsql.globinch.com/2009/02/02/cursor-oracle-plsql-cursors-and-example/" target="_self">Cursors </a>which accepts parameters at runtime.</p>
<p><span style="font-style: italic; font-weight: bold; color: #cc0000;">Read:</span><a href="http://plsql.globinch.com/2009/02/02/cursor-oracle-plsql-cursors-and-example/">Cursor | Oracle PL/SQL Cursors and example.</a><br />
<span style="font-style: italic; font-weight: bold; color: #cc0000;">Read:</span><a href="http://plsql.globinch.com/2009/02/02/ora-01000-maximum-open-cursors-exceeded/" target="_self">ORA-01000: maximum open cursors exceeded.</a><br />
<span style="font-style: italic; font-weight: bold; color: #cc0000;">Read:</span><a href="http://plsql.globinch.com/2009/02/02/oracle-cursors-open-fetch-and-close-cursor-statements/" target="_self">Oracle Cursors | OPEN ,FETCH and CLOSE Cursor statements.</a><br />
<span style="font-style: italic; font-weight: bold; color: #cc0000;">Read:</span><a href="http://plsql.globinch.com/2009/02/02/ora-01001-invalid-cursor/" target="_self">ORA-01001: invalid cursor</a></p>
<p>Example:</p>
<p><span style="font-weight: bold;">Step 1:</span></p>
<pre class="brush: css;">create table PERSON( PERSON_ID NUMBER(19) not null, AGE       NUMBER(10), FIRSTNAME VARCHAR2(255), LASTNAME  VARCHAR2(255));

SQL&amp;gt; insert into Person values(1,10,'Geek','Greek');

1 row inserted

SQL&amp;gt; insert into Person values(2,12,'Seek','Bells');

1 row inserted

SQL&amp;gt; insert into Person values(3,13,'Creek','Dells');

1 row inserted

SQL&amp;gt;SQL&amp;gt; insert into Person values(4,13,'Sreek','Sells');

1 row inserted

SQL&amp;gt;</pre>
<p><span style="font-weight: bold;">Step 2:</span></p>
<p>Now write a small procedure to illustrate the cursor which accepts a parameter at run time.</p>
<pre class="brush: css;">create or replace procedure Param_Cursor as

CURSOR PERSON_CUR(pAge NUMBER) isSelect * from Person p where p.age = pAge;

BEGIN    for i in PERSON_CUR(13) loop       dbms_output.put_line(i.firstname);    end loop;

END Param_Cursor;</pre>
<p><span style="font-weight: bold;">Step3:</span></p>
<p>Now run the procedure Param_Cursor.</p>
<pre class="brush: css;">SQL&amp;gt; set serveroutput on;SQL&amp;gt; exec Param_Cursor;CreekSreek

PL/SQL procedure successfully completed

SQL&amp;gt;</pre>
<p style="text-align: right; font-size: 9px;">Technorati Tags:<br />
<a title="Link to Technorati Tag category for Cursor" rel="tag" href="http://www.technorati.com/tag/Cursor" target="_blank">Cursor</a>, <a title="Link to Technorati Tag category for CLOSE cursor" rel="tag" href="http://www.technorati.com/tag/CLOSE+cursor" target="_blank">CLOSE cursor</a>, <a title="Link to Technorati Tag category for open cursor" rel="tag" href="http://www.technorati.com/tag/open+cursor" target="_blank">open cursor</a>, <a title="Link to Technorati Tag category for Fetch cursor" rel="tag" href="http://www.technorati.com/tag/Fetch+cursor" target="_blank">Fetch cursor</a>, <a title="Link to Technorati Tag category for Oracle cursor" rel="tag" href="http://www.technorati.com/tag/Oracle+cursor" target="_blank">Oracle cursor</a></p>
<div style="clear:both;">&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://plsql.globinch.com/2009/02/02/oracle-cursor-with-parameter/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ORA-01001: invalid cursor</title>
		<link>http://plsql.globinch.com/2009/02/02/ora-01001-invalid-cursor/</link>
		<comments>http://plsql.globinch.com/2009/02/02/ora-01001-invalid-cursor/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 12:56:00 +0000</pubDate>
		<dc:creator>globinch-sql-plsql</dc:creator>
				<category><![CDATA[Cursors]]></category>
		<category><![CDATA[Error Codes]]></category>
		<category><![CDATA[Fundamentals]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[SQL Error]]></category>

		<guid isPermaLink="false">http://plsql.globinch.com/?p=76</guid>
		<description><![CDATA[ORA-01001: invalid cursor error occurs when you tried to reference a cursor that does not yet exist.
A few scenarios given below.]]></description>
			<content:encoded><![CDATA[<!--S-ButtonZ 1.1.5 Start--><div style="float: left; width: 50px; padding-right: 10px; margin: 0 10px 0 0;">
		<script type="text/javascript">
		<!--
		yahooBuzzArticleHeadline = "ORA-01001: invalid cursor";
		yahooBuzzArticleCategory = "";
		yahooBuzzArticleType = "text";
		yahooBuzzArticleId = "http://plsql.globinch.com/2009/02/02/ora-01001-invalid-cursor/";
		yahooBuzzArticleSummary = "";
		//-->
		</script>
		<script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype="square"> </script></div><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fplsql.globinch.com%2F2009%2F02%2F02%2Fora-01001-invalid-cursor%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fplsql.globinch.com%2F2009%2F02%2F02%2Fora-01001-invalid-cursor%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><span style="font-weight: bold;">ORA-01001: invalid cursor</span> error occurs when you tried to reference a cursor that does not yet exist.<br />
A few scenarios given below.</p>
<p><span style="font-weight: bold;">1. </span><a href="http://plsqlworld.blogspot.com/2009/02/oracle-cursors-open-fetch-and-close.html">FETCH </a>cursor before opening the cursor.<br />
<span style="font-weight: bold;">2.</span> <a href="http://plsqlworld.blogspot.com/2009/02/oracle-cursors-open-fetch-and-close.html">CLOSE </a>cursor before opening the cursor.<br />
<span style="font-weight: bold;">3.</span> <a href="http://plsqlworld.blogspot.com/2009/02/oracle-cursors-open-fetch-and-close.html">FETCH </a>cursor after closing the cursor.</p>
<p>See the blow example:</p>
<p>When you write generic cursor you can either use <span style="font-weight: bold;">FETCH</span>..,<span style="font-weight: bold;">OPEN</span>&#8230; and <span style="font-weight: bold;">CLOSE </span>cursor statements Or you can use the FOR LOOP for iterating through the cursor. When you use FOR LOOP for iteration no need of Explicit use of FETCH..,OPEN&#8230; and CLOSE cursor statements.<br />
The cursor will open automatically when entering FOR LOOP and will close the cursor once the loop ends.</p>
<p><span style="font-style: italic; font-weight: bold; color: #cc0000;">Read:</span><a href="http://feedproxy.google.com/%7Er/plsqlworld/%7E3/XDYxP4nNLpQ/cursor-oracle-plsql-cursors-and-example.html">Cursor | Oracle PL/SQL Cursors and example.</a><br />
<a href="http://plsqlworld.blogspot.com/2009/02/ora-01000-maximum-open-cursors-exceeded.html"><span style="font-style: italic; font-weight: bold; color: #cc0000;">Read:</span>ORA-01000: maximum open cursors exceeded.</a><br />
<a href="http://plsqlworld.blogspot.com/2009/02/oracle-cursors-open-fetch-and-close.html"><span style="font-style: italic; font-weight: bold; color: #cc0000;">Read:</span></a><a href="http://plsqlworld.blogspot.com/2009/02/oracle-cursors-open-fetch-and-close.html">Oracle Cursors | OPEN ,FETCH and CLOSE Cursor statements.</a></p>
<p>If you use CLOSE statement after the FOR LOOP Oracle will throw the error :<br />
ORA-01001:Invalid Cursor</p>
<p>See the example below</p>
<pre class="brush: css;">
create or replace procedure Param_Cursor as

CURSOR PERSON_CUR(pAge NUMBER) is
Select * from Person p where p.age = pAge;

BEGIN
    for i in PERSON_CUR(13) loop
       dbms_output.put_line(i.firstname);
    end loop;
 close PERSON_CUR;
END Param_Cursor;
</pre>
<p>Execute this:</p>
<pre class="brush: css;">
SQL&amp;gt; exec Param_Cursor;

begin Param_Cursor; end;

ORA-01001: invalid cursor
ORA-06512: at &quot;TEST.PARAM_CURSOR&quot;, line 10
ORA-06512: at line 1

SQL&amp;gt;
</pre>
<p style="text-align: right; font-size: 9px;">Technorati Tags:<br />
<a title="Link to Technorati Tag category for ORA-01001" rel="tag" href="http://www.technorati.com/tag/ORA-01001" target="_blank">ORA-01001</a>, <a title="Link to Technorati Tag category for CLOSE cursor" rel="tag" href="http://www.technorati.com/tag/CLOSE+cursor" target="_blank">CLOSE cursor</a>, <a title="Link to Technorati Tag category for open cursor" rel="tag" href="http://www.technorati.com/tag/open+cursor" target="_blank">open cursor</a>, <a title="Link to Technorati Tag category for Fetch cursor" rel="tag" href="http://www.technorati.com/tag/Fetch+cursor" target="_blank">Fetch cursor</a>, <a title="Link to Technorati Tag category for Oracle cursor" rel="tag" href="http://www.technorati.com/tag/Oracle+cursor" target="_blank">Oracle cursor</a></p>
<div style="clear:both;">&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://plsql.globinch.com/2009/02/02/ora-01001-invalid-cursor/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Oracle Cursors &#124; OPEN ,FETCH and CLOSE Cursor statements.</title>
		<link>http://plsql.globinch.com/2009/02/02/oracle-cursors-open-fetch-and-close-cursor-statements/</link>
		<comments>http://plsql.globinch.com/2009/02/02/oracle-cursors-open-fetch-and-close-cursor-statements/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 12:49:00 +0000</pubDate>
		<dc:creator>globinch-sql-plsql</dc:creator>
				<category><![CDATA[Cursors]]></category>
		<category><![CDATA[Fundamentals]]></category>
		<category><![CDATA[Key Words]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://plsql.globinch.com/?p=75</guid>
		<description><![CDATA[A cursor is a name for private SQL area.It is in private SQL area the parsed statement and other information for processing the statement are kept.]]></description>
			<content:encoded><![CDATA[<!--S-ButtonZ 1.1.5 Start--><div style="float: left; width: 50px; padding-right: 10px; margin: 0 10px 0 0;">
		<script type="text/javascript">
		<!--
		yahooBuzzArticleHeadline = "Oracle Cursors | OPEN ,FETCH and CLOSE Cursor statements.";
		yahooBuzzArticleCategory = "";
		yahooBuzzArticleType = "text";
		yahooBuzzArticleId = "http://plsql.globinch.com/2009/02/02/oracle-cursors-open-fetch-and-close-cursor-statements/";
		yahooBuzzArticleSummary = "";
		//-->
		</script>
		<script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype="square"> </script></div><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fplsql.globinch.com%2F2009%2F02%2F02%2Foracle-cursors-open-fetch-and-close-cursor-statements%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fplsql.globinch.com%2F2009%2F02%2F02%2Foracle-cursors-open-fetch-and-close-cursor-statements%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>A <a href="http://plsql.globinch.com/2009/02/02/cursor-oracle-plsql-cursors-and-example/" target="_self"><span style="font-weight: bold;">cursor </span></a>is a name for private SQL area.It is in private SQL area the parsed statement and other information for processing the statement are kept.<br />
Execution of a cursor puts the results of the query into a set of rows called the result set, which can be fetched sequentially or non sequentially.</p>
<p><span style="font-style: italic; font-weight: bold; color: #cc0000;">Read:</span><a href="http://plsql.globinch.com/2009/02/02/oracle-cursors-open-fetch-and-close-cursor-statements/" target="_self">Cursor | Oracle PL/SQL Cursors and example.</a><br />
<span style="font-style: italic; font-weight: bold; color: #cc0000;">Read:</span><a href="http://plsql.globinch.com/2009/02/02/ora-01000-maximum-open-cursors-exceeded/" target="_self">ORA-01000: maximum open cursors exceeded.</a></p>
<p>When you write generic cursor you can either use <span style="font-weight: bold;">FETCH</span>..,<span style="font-weight: bold;">OPEN</span>&#8230; and <span style="font-weight: bold;">CLOSE </span>cursor statements as give below.</p>
<pre class="brush: css;">

CREATE OR REPLACE PROCEDURE Generic_Cursor IS
&lt;pre&gt;CURSOR FETCH_INSERT ISSELECT * from PERSON;

new_Rec FETCH_INSERT%ROWTYPE;

BEGIN

 OPEN FETCH_INSERT;    LOOP      FETCH FETCH_INSERT INTO new_Rec;      EXIT when FETCH_INSERT%NOTFOUND;      DBMS_OUTPUT.put_line(new_Rec.FIRSTNAME);    END LOOP; CLOSE FETCH_INSERT;

END Generic_Cursor;
</pre>
<p>Or you can use the <span style="font-weight: bold;">FOR LOOP</span> for iterating through the cursor. When you use FOR LOOP for iteration no need of Explicit use of <span style="font-weight: bold;">FETCH</span>..,<span style="font-weight: bold;">OPEN</span>&#8230; and <span style="font-weight: bold;">CLOSE </span>cursor statements.<br />
The cursor will open automatically when entering FOR LOOP and will close the cursor once the loop ends.</p>
<p>Example  given below</p>
<pre class="brush: css;">
&lt;pre&gt;CURSOR PERSON_CUR(pAge NUMBER) isSelect * from Person p where p.age = pAge;

BEGIN    for i in PERSON_CUR(13) loop       dbms_output.put_line(i.firstname);    end loop;

END Param_Cursor;
</pre>
<p><span style="font-weight: bold; color: #cc0000;">Also read:</span></p>
<ul id="Feed2_feedItemListDisplay" style="padding: 0px;">
<li style="padding: 0px;"><a href="http://plsql.globinch.com/2009/01/13/oracle-alter-table-to-add-columns/"><span style="font-size: 85%;">Oracle &#8216;ALTER TABLE&#8217; to ADD columns</span></a></li>
<li style="padding: 0px;"><a href="http://plsql.globinch.com/2009/01/12/create-index-as-part-of-create-table-statement/" target="_self"><span style="font-size: 85%;">CREATE INDEX as part of CREATE TABLE statement.</span></a></li>
<li style="padding: 0px;"><a href="http://plsql.globinch.com/2009/01/09/oracle-tables-create-table-as-select/"><span style="font-size: 85%;">Oracle Tables: Create Table as Select</span></a></li>
<li style="padding: 0px;"><a href="http://plsql.globinch.com/2009/01/09/oracle-tables-create-table-with-foreign-key-constraint/" target="_self"><span style="font-size: 85%;">Oracle Tables: Create table with foreign key constraint</span></a></li>
<li style="padding: 0px;"><a href="http://plsql.globinch.com/2009/01/09/create-table-create-table-with-composite-primary-key/" target="_self"><span style="font-size: 85%;">&#8216;CREATE TABLE&#8217; : create table with composite primary key</span></a></li>
</ul>
<p style="text-align: right; font-size: 9px;">Technorati Tags:<br />
<a title="Link to Technorati Tag category for Cursor" rel="tag" href="http://www.technorati.com/tag/Cursor" target="_blank">Cursor</a>, <a title="Link to Technorati Tag category for CLOSE cursor" rel="tag" href="http://www.technorati.com/tag/CLOSE+cursor" target="_blank">CLOSE cursor</a>, <a title="Link to Technorati Tag category for open cursor" rel="tag" href="http://www.technorati.com/tag/open+cursor" target="_blank">open cursor</a>, <a title="Link to Technorati Tag category for Fetch cursor" rel="tag" href="http://www.technorati.com/tag/Fetch+cursor" target="_blank">Fetch cursor</a>, <a title="Link to Technorati Tag category for Oracle cursor" rel="tag" href="http://www.technorati.com/tag/Oracle+cursor" target="_blank">Oracle cursor</a></p>
<div style="clear:both;">&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://plsql.globinch.com/2009/02/02/oracle-cursors-open-fetch-and-close-cursor-statements/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ORA-01000: maximum open cursors exceeded.</title>
		<link>http://plsql.globinch.com/2009/02/02/ora-01000-maximum-open-cursors-exceeded/</link>
		<comments>http://plsql.globinch.com/2009/02/02/ora-01000-maximum-open-cursors-exceeded/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 12:38:00 +0000</pubDate>
		<dc:creator>globinch-sql-plsql</dc:creator>
				<category><![CDATA[Cursors]]></category>
		<category><![CDATA[Error Codes]]></category>
		<category><![CDATA[Fundamentals]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[SQL Error]]></category>

		<guid isPermaLink="false">http://plsql.globinch.com/?p=74</guid>
		<description><![CDATA[ORA-01000: maximum open cursors exceeded.Each user session can open multiple cursors up to the limit set by the initialization parameter OPEN_CURSORS.]]></description>
			<content:encoded><![CDATA[<!--S-ButtonZ 1.1.5 Start--><div style="float: left; width: 50px; padding-right: 10px; margin: 0 10px 0 0;">
		<script type="text/javascript">
		<!--
		yahooBuzzArticleHeadline = "ORA-01000: maximum open cursors exceeded.";
		yahooBuzzArticleCategory = "";
		yahooBuzzArticleType = "text";
		yahooBuzzArticleId = "http://plsql.globinch.com/2009/02/02/ora-01000-maximum-open-cursors-exceeded/";
		yahooBuzzArticleSummary = "";
		//-->
		</script>
		<script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype="square"> </script></div><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fplsql.globinch.com%2F2009%2F02%2F02%2Fora-01000-maximum-open-cursors-exceeded%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fplsql.globinch.com%2F2009%2F02%2F02%2Fora-01000-maximum-open-cursors-exceeded%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Each user session can open multiple <a href="http://plsql.globinch.com/tag/cursor/" target="_self"><span style="font-weight: bold;">cursors </span></a>up to the limit set by the initialization parameter <span style="font-weight: bold; color: #cc0000;">OPEN_CURSORS</span>.<br />
If the number of open cursors exceeds this limit,oracle will throw the &#8216;<span style="font-weight: bold;">ORA-01000: maximum open cursors exceeded</span>&#8216; exception or error.</p>
<pre class="brush: css;">
ORA-01000: maximum open cursors exceeded.
</pre>
<p>To make sure that the number of open cursors doesn&#8217;t exceeds the limit as specified in initialization parameter, close the cursors after the use.</p>
<p><span style="font-weight: bold; color: #cc0000;">Read:</span> <a href="http://plsql.globinch.com/2009/02/02/cursor-oracle-plsql-cursors-and-example/">Cursor | Oracle PL/SQL Cursors and example.</a></p>
<p>For example when we use a <a href="http://plsql.globinch.com/tag/cursor/" target="_self">Cursor </a>object or resultset object,close it once the operation is over.<br />
When we use <span style="font-weight: bold;">JDBC </span>programming ,this error is common. This is because ,the application developer is either missed of not closed the jdbc object used.The objects can be Statements,Result sets or even <span style="font-weight: bold;">JDBC </span>database connection objects.</p>
<p><span style="font-weight: bold; color: #cc0000;">Also Read:</span></p>
<ul id="Feed2_feedItemListDisplay" style="padding: 0px;">
<li style="padding: 0px;"><a href="http://plsql.globinch.com/2009/01/13/oracle-alter-table-to-add-columns/" target="_self">Oracle &#8216;ALTER TABLE&#8217; to ADD columns</a></li>
<li style="padding: 0px;"><a href="http://plsql.globinch.com/2009/01/12/create-index-as-part-of-create-table-statement/" target="_self">CREATE INDEX as part of CREATE TABLE statement.</a></li>
<li style="padding: 0px;"><a href="http://plsql.globinch.com/2009/01/09/oracle-tables-create-table-as-select/" target="_self">Oracle Tables: Create Table as Select</a></li>
<li style="padding: 0px;"><a href="http://plsql.globinch.com/2009/01/09/oracle-tables-create-table-with-foreign-key-constraint/" target="_self">Oracle Tables: Create table with foreign key constraint</a></li>
<li style="padding: 0px;"><a href="http://plsql.globinch.com/2009/01/09/create-table-create-table-with-composite-primary-key/" target="_self">&#8216;CREATE TABLE&#8217; : create table with composite primary key</a></li>
</ul>
<p style="text-align: right; font-size: 9px;">Technorati Tags:<br />
<a title="Link to Technorati Tag category for ORA-01000" rel="tag" href="http://www.technorati.com/tag/ORA-01000" target="_blank">ORA-01000</a>, <a title="Link to Technorati Tag category for CLOSE cursor" rel="tag" href="http://www.technorati.com/tag/CLOSE+cursor" target="_blank">CLOSE cursor</a>, <a title="Link to Technorati Tag category for open cursor" rel="tag" href="http://www.technorati.com/tag/open+cursor" target="_blank">open cursor</a>, <a title="Link to Technorati Tag category for Fetch cursor" rel="tag" href="http://www.technorati.com/tag/Fetch+cursor" target="_blank">Fetch cursor</a>, <a title="Link to Technorati Tag category for Oracle cursor" rel="tag" href="http://www.technorati.com/tag/Oracle+cursor" target="_blank">Oracle cursor</a></p>
<div style="clear:both;">&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://plsql.globinch.com/2009/02/02/ora-01000-maximum-open-cursors-exceeded/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Cursor &#124; Oracle PL/SQL Cursors and example.</title>
		<link>http://plsql.globinch.com/2009/02/02/cursor-oracle-plsql-cursors-and-example/</link>
		<comments>http://plsql.globinch.com/2009/02/02/cursor-oracle-plsql-cursors-and-example/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 12:32:00 +0000</pubDate>
		<dc:creator>globinch-sql-plsql</dc:creator>
				<category><![CDATA[Cursors]]></category>
		<category><![CDATA[Fundamentals]]></category>
		<category><![CDATA[Key Words]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://plsql.globinch.com/?p=73</guid>
		<description><![CDATA[A cursor is a name for private SQL area.It is in private SQL area where the parsed statement and other information for processing the statement are kept.]]></description>
			<content:encoded><![CDATA[<!--S-ButtonZ 1.1.5 Start--><div style="float: left; width: 50px; padding-right: 10px; margin: 0 10px 0 0;">
		<script type="text/javascript">
		<!--
		yahooBuzzArticleHeadline = "Cursor | Oracle PL/SQL Cursors and example.";
		yahooBuzzArticleCategory = "";
		yahooBuzzArticleType = "text";
		yahooBuzzArticleId = "http://plsql.globinch.com/2009/02/02/cursor-oracle-plsql-cursors-and-example/";
		yahooBuzzArticleSummary = "";
		//-->
		</script>
		<script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype="square"> </script></div><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fplsql.globinch.com%2F2009%2F02%2F02%2Fcursor-oracle-plsql-cursors-and-example%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fplsql.globinch.com%2F2009%2F02%2F02%2Fcursor-oracle-plsql-cursors-and-example%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>A <span style="font-weight: bold;">cursor </span>is a name for private SQL area.It is in <span style="font-weight: bold;">private SQL area</span> where the parsed statement and other information for processing the statement are kept.<br />
Execution of a cursor puts the results of the query into a set of rows called the result set, which can be fetched sequentially or nonsequentially.</p>
<p>A simple example of <span style="font-weight: bold;">Cursor </span>is given below.This uses a generic Cursor example,in which we <span style="font-weight: bold;">OPEN </span>the cursor , <span style="font-weight: bold;">Fetch </span>the records,do some operation then <span style="font-weight: bold;">CLOSE </span>the cursor.</p>
<p><span style="font-weight: bold; color: #cc0000;">Step1: </span>Create a table PERSON and insert few records into it.</p>
<pre class="brush: css;">
create table PERSON(PERSON_ID NUMBER(19) not null,AGE       NUMBER(10),FIRSTNAME VARCHAR2(255),LASTNAME  VARCHAR2(255));

SQL&gt; insert into Person values(1,10,'Geek','Greek');

1 row inserted

SQL&gt; insert into Person values(2,12,'Seek','Bells');

1 row inserted

SQL&gt; insert into Person values(3,13,'Creek','Dells');

1 row inserted

SQL&gt;SQL&gt; insert into Person values(4,13,'Sreek','Sells');

1 row inserted

SQL&amp;gt;
</pre>
<p><span style="font-weight: bold; color: #cc0000;">Step2: </span>Create a Procedure for displaying the table data.</p>
<pre class="brush: css;">
CREATE OR REPLACE PROCEDURE Generic_Cursor IS

CURSOR FETCH_INSERT ISSELECT * from PERSON;

new_Rec FETCH_INSERT%ROWTYPE;

BEGIN

 OPEN FETCH_INSERT;   LOOP     FETCH FETCH_INSERT INTO new_Rec;     EXIT when FETCH_INSERT%NOTFOUND;     DBMS_OUTPUT.put_line(new_Rec.FIRSTNAME);   END LOOP; CLOSE FETCH_INSERT;

END Generic_Cursor;
</pre>
<p><span style="font-weight: bold; color: #cc0000;">Step 3:</span>Now test it using a small test program</p>
<pre class="brush: css;">
SQL&amp;gt; exec Param_Cursor;

begin Param_Cursor; end;

ORA-01001: invalid cursorORA-06512: at &quot;TEST.PARAM_CURSOR&quot;, line 10ORA-06512: at line 1

SQL&gt;
</pre>
<p><span style="font-weight: bold; color: #cc0000;">Also Read:</span></p>
<ul id="Feed2_feedItemListDisplay" style="padding: 0px;">
<li style="padding: 0px;"><span style="font-size: 85%;"><a href="http://plsql.globinch.com/2009/01/13/oracle-alter-table-to-add-columns/" target="_self">Oracle &#8216;ALTER TABLE&#8217; to ADD columns</a></span></li>
<li style="padding: 0px;"><span style="font-size: 85%;"><a href="http://plsql.globinch.com/2009/01/12/create-index-as-part-of-create-table-statement/" target="_self">CREATE INDEX as part of CREATE TABLE statement.</a></span></li>
<li style="padding: 0px;"><span style="font-size: 85%;"><a href="http://plsql.globinch.com/2009/01/09/oracle-tables-create-table-as-select/" target="_self">Oracle Tables: Create Table as Select</a></span></li>
<li style="padding: 0px;"><span style="font-size: 85%;"><a href="http://plsql.globinch.com/2009/01/09/oracle-tables-create-table-with-foreign-key-constraint/" target="_self">Oracle Tables: Create table with foreign key constraint</a></span></li>
<li style="padding: 0px;"><span style="font-size: 85%;"><a href="http://plsql.globinch.com/2009/01/09/create-table-create-table-with-composite-primary-key/" target="_self">&#8216;CREATE TABLE&#8217; : create table with composite primary key</a></span></li>
</ul>
<p style="text-align: right; font-size: 9px;">Technorati Tags:<br />
<a title="Link to Technorati Tag category for Cursor" rel="tag" href="http://www.technorati.com/tag/Cursor" target="_blank">Cursor</a>, <a title="Link to Technorati Tag category for CLOSE cursor" rel="tag" href="http://www.technorati.com/tag/CLOSE+cursor" target="_blank">CLOSE cursor</a>, <a title="Link to Technorati Tag category for open cursor" rel="tag" href="http://www.technorati.com/tag/open+cursor" target="_blank">open cursor</a>, <a title="Link to Technorati Tag category for Fetch cursor" rel="tag" href="http://www.technorati.com/tag/Fetch+cursor" target="_blank">Fetch cursor</a>, <a title="Link to Technorati Tag category for Oracle cursor" rel="tag" href="http://www.technorati.com/tag/Oracle+cursor" target="_blank">Oracle cursor</a></p>
<div style="clear:both;">&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://plsql.globinch.com/2009/02/02/cursor-oracle-plsql-cursors-and-example/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Oracle &#8216;ALTER TABLE&#8217; to ADD columns</title>
		<link>http://plsql.globinch.com/2009/01/13/oracle-alter-table-to-add-columns/</link>
		<comments>http://plsql.globinch.com/2009/01/13/oracle-alter-table-to-add-columns/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 11:36:00 +0000</pubDate>
		<dc:creator>globinch-sql-plsql</dc:creator>
				<category><![CDATA[Fundamentals]]></category>
		<category><![CDATA[Key Words]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Tables]]></category>

		<guid isPermaLink="false">http://plsql.globinch.com/?p=72</guid>
		<description><![CDATA[We can use the 'ALTER TABLE' statement in oracle to add columns to a table using ADD keyword.]]></description>
			<content:encoded><![CDATA[<!--S-ButtonZ 1.1.5 Start--><div style="float: left; width: 50px; padding-right: 10px; margin: 0 10px 0 0;">
		<script type="text/javascript">
		<!--
		yahooBuzzArticleHeadline = "Oracle &#8216;ALTER TABLE&#8217; to ADD columns";
		yahooBuzzArticleCategory = "";
		yahooBuzzArticleType = "text";
		yahooBuzzArticleId = "http://plsql.globinch.com/2009/01/13/oracle-alter-table-to-add-columns/";
		yahooBuzzArticleSummary = "";
		//-->
		</script>
		<script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype="square"> </script></div><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fplsql.globinch.com%2F2009%2F01%2F13%2Foracle-alter-table-to-add-columns%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fplsql.globinch.com%2F2009%2F01%2F13%2Foracle-alter-table-to-add-columns%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>We can use the &#8216;<a href="http://plsql.globinch.com/2008/11/13/alter-table-to-add-primary-key-in-oracle-oracle-alter-table/" target="_self">ALTER TABLE</a>&#8216; statement in oracle to add columns to a table using <span style="font-weight: bold;">ADD</span> keyword.<br />
It is fairly straight forward.<br />
We can specify column details and constraints if any,<br />
See the below example.</p>
<pre class="brush: css;">
SQL&gt; create table MYTABLE(name varchar2(100),age number);

Table created
</pre>
<p>Now let us use the &#8216;&lt;span style=&#8221;font-weight: bold;&#8221;&gt;ALTER TABLE&lt;/span&gt;&#8217; statement to add new columns to the table &lt;span style=&#8221;font-weight: bold;&#8221;&gt;MYTABLE&lt;/span&gt;.</p>
<pre class="brush: css;">
SQL&gt; ALTER TABLE MYTABLE add(id number NOT NULL,address varchar2(100));

Table altered

SQL&gt;
</pre>
<p><span style="margin: 0px 5px; padding: 0px 5px; overflow: auto; clear: both; display: block; width: auto; font-style: normal; font-variant: normal; line-height: 18px; font-size-adjust: none; font-stretch: normal; font-weight: bold; color: #cc0033; font-family: arial,helvetica,sans-serif; font-size: 13px;">Related Articles,</span><span style="margin: 0px 5px; padding: 0px 5px 0pt; overflow: auto; clear: both; display: block; width: auto; background-color: #f8f8f8; font-family: arial,helvetica,sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: 18px; font-size-adjust: none; font-stretch: normal; color: #3d81ee;"><a href="http://plsql.globinch.com/2008/11/13/alter-table-to-add-primary-key-in-oracle-oracle-alter-table/" target="_self">ALTER TABLE to ADD PRIMARY KEY in Oracle.</a></span><br />
<span style="margin: 0px 5px; padding: 0px 5px 0pt; overflow: auto; clear: both; display: block; width: auto; background-color: #f8f8f8; font-style: normal; font-variant: normal; font-weight: normal; line-height: 18px; font-size-adjust: none; font-stretch: normal; color: #3d81ee; font-family: arial,helvetica,sans-serif; font-size: 12px;"><br />
Also Read:<br />
<span style="margin: 0px 5px; padding: 0px 5px 0pt; overflow: auto; clear: both; display: block; width: auto; background-color: #f8f8f8; font-style: normal; font-variant: normal; font-weight: normal; line-height: 18px; font-size-adjust: none; font-stretch: normal; color: #3d81ee; font-family: arial,helvetica,sans-serif;"><br />
<a href="http://plsql.globinch.com/2009/01/12/create-index-as-part-of-create-table-statement/" target="_self">CREATE INDEX as part of CREATE TABLE statement.</a><br />
<a href="http://plsql.globinch.com/2009/01/09/oracle-tables-create-table-as-select/" target="_self">Oracle Tables: Create Table as Select</a><br />
<a href="http://plsql.globinch.com/2009/01/09/oracle-tables-create-table-with-foreign-key-constraint/" target="_self">Oracle/PLSQL: Create table with foreign key constraint</a><br />
<a href="http://plsql.globinch.com/2009/01/09/create-table-create-table-with-composite-primary-key/" target="_self">CREATE TABLE statement: create a table with composite primary key</a><br />
<a href="http://plsql.globinch.com/2009/01/09/oracle-tables-create-table-statement-create-a-table-with-primary-key/" target="_self">Oracle PL/SQL:CREATE TABLE statement: create a table with primary key.</a><br />
<a href="http://plsql.globinch.com/2009/01/09/oracle-tablescreate-table/" target="_self">Oracle PL/SQL:Create Table</a><br />
<a href="http://plsql.globinch.com/2009/01/09/oracle-tables-foreign-keys-with-on-delete-cascade-option/" target="_self">Oracle/PLSQL: Foreign Keys with ON DELETE CASCADE option</a></span></span></p>
<p style="text-align: right; font-size: 9px;">Technorati Tags:<br />
<a title="Link to Technorati Tag category for ALTER TABLE" rel="tag" href="http://www.technorati.com/tag/ALTER+TABLE" target="_blank">ALTER TABLE</a>, <a title="Link to Technorati Tag category for ADD columns" rel="tag" href="http://www.technorati.com/tag/ADD+columns" target="_blank">ADD columns</a>, <a title="Link to Technorati Tag category for oracle alter table" rel="tag" href="http://www.technorati.com/tag/oracle+alter+table" target="_blank">oracle alter table</a></p>
<div style="clear:both;">&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://plsql.globinch.com/2009/01/13/oracle-alter-table-to-add-columns/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CREATE INDEX as part of CREATE TABLE statement.</title>
		<link>http://plsql.globinch.com/2009/01/12/create-index-as-part-of-create-table-statement/</link>
		<comments>http://plsql.globinch.com/2009/01/12/create-index-as-part-of-create-table-statement/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 10:25:00 +0000</pubDate>
		<dc:creator>globinch-sql-plsql</dc:creator>
				<category><![CDATA[Constraints]]></category>
		<category><![CDATA[Fundamentals]]></category>
		<category><![CDATA[Key Words]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Tables]]></category>

		<guid isPermaLink="false">http://plsql.globinch.com/?p=71</guid>
		<description><![CDATA[CREATE INDEX statement is used to create Indexes using table columns.An index allows faster retrieval of records.It is mainly used as a performance-tuning method.An index creates an entry for each value that appears in the indexed columns.]]></description>
			<content:encoded><![CDATA[<!--S-ButtonZ 1.1.5 Start--><div style="float: left; width: 50px; padding-right: 10px; margin: 0 10px 0 0;">
		<script type="text/javascript">
		<!--
		yahooBuzzArticleHeadline = "CREATE INDEX as part of CREATE TABLE statement.";
		yahooBuzzArticleCategory = "";
		yahooBuzzArticleType = "text";
		yahooBuzzArticleId = "http://plsql.globinch.com/2009/01/12/create-index-as-part-of-create-table-statement/";
		yahooBuzzArticleSummary = "";
		//-->
		</script>
		<script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype="square"> </script></div><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fplsql.globinch.com%2F2009%2F01%2F12%2Fcreate-index-as-part-of-create-table-statement%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fplsql.globinch.com%2F2009%2F01%2F12%2Fcreate-index-as-part-of-create-table-statement%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><span style="font-weight: bold; color: #cc0000;">CREATE INDEX</span> statement is used to create Indexes using table columns.An index allows faster retrieval of records.It is mainly used as a performance-tuning method.An index creates an entry for each value that appears in the indexed columns.<br />
You can create indexes explicitly using the <span style="color: #cc0000;">SQL </span>statement <span style="font-weight: bold;">CREATE INDEX </span>or as a part of <a href="http://plsqlworld.blogspot.com/2009/01/oracle-plsqlcreate-table-statement.html"></a><a href="http://plsql.globinch.com/2009/01/09/oracle-tablescreate-table/" target="_self">CREATE TABLE</a> script.</p>
<p><span style="font-weight: bold;">SYNTAX:</span></p>
<pre>CREATE [UNIQUE] INDEX indexON table(column1,.. column_n)[ STORAGE CLAUSE ];</pre>
<p>For example let us create a table MYTABLE;</p>
<pre class="brush: css;">
SQL&gt; CREATE TABLE MYTABLE (name varchar2(50),age number,id number);

Table created
</pre>
<p>Now create an unique index for MYTABLE using coulmns name and id.</p>
<pre class="brush: css;">
SQL&gt; CREATE UNIQUE INDEX MY_IDX ON MYTABLE(name,id);

Index created

SQL&gt;
</pre>
<p>Now each row in the table will be uniquely indexed using the index MY_IDX.This will help faster retrieval of records from huge tables.<br />
The above two steps can be combined into one step process as follows.</p>
<pre class="brush: css;">
SQL&gt; CREATE TABLE MYTABLE (name varchar2(50),age number,id number, CONSTRAINT my_Constraint unique(name,id) USING INDEX (CREATE UNIQUE INDEX  MY_IDX on MYTABLE(name,id)));

SQL&gt; Table created
</pre>
<p><span style="margin: 0px; padding: 5px 5px 0px; overflow: auto; clear: both; display: block; width: auto; font-style: normal; font-variant: normal; line-height: 18px; font-size-adjust: none; font-stretch: normal; font-weight: bold; color: #cc0033; font-family: arial,helvetica,sans-serif; font-size: 13px;">Related Articles,</span><span style="margin: 5px; padding: 5px 5px 0pt; overflow: auto; clear: both; display: block; width: auto; background-color: #f8f8f8; font-style: normal; font-variant: normal; font-weight: normal; line-height: 18px; font-size-adjust: none; font-stretch: normal; color: #3d81ee; font-family: arial,helvetica,sans-serif; font-size: 12px;"><a href="http://plsql.globinch.com/2009/01/09/oracle-tables-create-table-as-select/" target="_self">Oracle Tables: Create Table as Select</a><br />
<a href="http://plsql.globinch.com/2009/01/09/oracle-tables-create-table-with-foreign-key-constraint/" target="_self">Oracle/PLSQL: Create table with foreign key constraint</a><br />
<a href="http://plsql.globinch.com/2009/01/09/create-table-create-table-with-composite-primary-key/" target="_self">CREATE TABLE statement: create a table with composite primary key</a><br />
<a href="http://plsql.globinch.com/2009/01/09/oracle-tables-create-table-statement-create-a-table-with-primary-key/" target="_self">Oracle PL/SQL:CREATE TABLE statement: create a table with primary key.</a><br />
<a href="http://plsql.globinch.com/2009/01/09/oracle-tablescreate-table/" target="_self">Oracle PL/SQL:Create Table</a><br />
<a href="http://plsqlworld.blogspot.com/2009/01/oracleplsql-foreign-keys-with-on-delete.html"></a></span></p>
<p style="text-align: right; font-size: 9px;">Technorati Tags:<br />
<a title="Link to Technorati Tag category for CREATE INDEX" rel="tag" href="http://www.technorati.com/tag/CREATE+INDEX" target="_blank">CREATE INDEX</a>, <a title="Link to Technorati Tag category for CONSTRAINT" rel="tag" href="http://www.technorati.com/tag/CONSTRAINT" target="_blank">CONSTRAINT</a>, <a title="Link to Technorati Tag category for CREATE UNIQUE INDEX" rel="tag" href="http://www.technorati.com/tag/CREATE+UNIQUE+INDEX" target="_blank">CREATE UNIQUE INDEX</a>, <a title="Link to Technorati Tag category for UNIQUE INDEX" rel="tag" href="http://www.technorati.com/tag/UNIQUE+INDEX" target="_blank">UNIQUE INDEX</a>, <a title="Link to Technorati Tag category for CREATE TABLE" rel="tag" href="http://www.technorati.com/tag/CREATE+TABLE" target="_blank">CREATE TABLE</a></p>
<div style="clear:both;">&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://plsql.globinch.com/2009/01/12/create-index-as-part-of-create-table-statement/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Oracle Tables: Create Table as Select</title>
		<link>http://plsql.globinch.com/2009/01/09/oracle-tables-create-table-as-select/</link>
		<comments>http://plsql.globinch.com/2009/01/09/oracle-tables-create-table-as-select/#comments</comments>
		<pubDate>Fri, 09 Jan 2009 10:41:00 +0000</pubDate>
		<dc:creator>globinch-sql-plsql</dc:creator>
				<category><![CDATA[Fundamentals]]></category>
		<category><![CDATA[Key Words]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Tables]]></category>

		<guid isPermaLink="false">http://plsql.globinch.com/?p=70</guid>
		<description><![CDATA[CREATE TABLE AS SELECT statement can be used when we need to extract part or full data from a table and store it into another table based on certain conditions .]]></description>
			<content:encoded><![CDATA[<!--S-ButtonZ 1.1.5 Start--><div style="float: left; width: 50px; padding-right: 10px; margin: 0 10px 0 0;">
		<script type="text/javascript">
		<!--
		yahooBuzzArticleHeadline = "Oracle Tables: Create Table as Select";
		yahooBuzzArticleCategory = "";
		yahooBuzzArticleType = "text";
		yahooBuzzArticleId = "http://plsql.globinch.com/2009/01/09/oracle-tables-create-table-as-select/";
		yahooBuzzArticleSummary = "";
		//-->
		</script>
		<script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype="square"> </script></div><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fplsql.globinch.com%2F2009%2F01%2F09%2Foracle-tables-create-table-as-select%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fplsql.globinch.com%2F2009%2F01%2F09%2Foracle-tables-create-table-as-select%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><span style="font-weight: bold; color: #cc0000;">CREATE TABLE AS SELECT</span> statement can be used when we need to extract  part or full data from a table and store it into another table based on certain conditions .<br />
We can create a table based on a query and insert the results of the query into the table<br />
For example if we need the details of all employees whose salary is above certain limit and store it into another table,we can use  <span style="font-weight: bold;">CREATE TABLE AS SELECT</span> statement.</p>
<p>The following example illustrates this.<br />
Let us <a href="http://plsqlworld.blogspot.com/2009/01/oracleplsql-create-table-with-foreign.html">create an EMPLOYEE table</a> which holds the employee information like name ,id and salary.</p>
<pre class="brush: css;">
SQL&gt; create table EMPLOYEE(name VARCHAR2(50),emp_id NUMBER,salary NUMBER(8,2));

Table created
</pre>
<p>Now insert some records in EMPLOYEE table.</p>
<pre class="brush: css;">
SQL&gt; insert into EMPLOYEE values('A',1,12345);insert into EMPLOYEE values('B',2,13345);insert into EMPLOYEE values('C',3,10345);insert into EMPLOYEE values('D',4,14345);
4 row inserted

SQL&gt; select * from EMPLOYEE order by salary;

NAME  EMP_ID SALARY
C     3   10345.00
A     1   12345.00
B     2   13345.00
D     4   14345.00
</pre>
<p>Now let us create a table for employees whose salary is above 13000.</p>
<pre class="brush: css;">
SQL&gt; CREATE TABLE EMPLOYEE_MAX AS SELECT * from EMPLOYEE WHERE EMPLOYEE.salary&gt;13000;
Table created
</pre>
<p>Now query the EMPLOYEE_MAX table.</p>
<pre class="brush: css;">
SQL&gt; select * from EMPLOYEE_MAX;

NAME EMP_ID SALARY
B    2   13345.00
D    4   14345.00
</pre>
<p>The new table has created with records based on the criteria in <span style="font-weight: bold;">WHERE </span>clause.</p>
<p><span style="margin: 0px; padding: 5px 5px 0px; overflow: auto; clear: both; display: block; width: auto; font-family: arial,helvetica,sans-serif; font-style: normal; font-variant: normal; font-size: 13px; line-height: 18px; font-size-adjust: none; font-stretch: normal; font-weight: bold; color: #cc0033;">Also Read</span><span style="margin: 5px; padding: 5px 5px 0pt; overflow: auto; clear: both; display: block; width: auto; background-color: #f8f8f8; font-family: arial,helvetica,sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: 18px; font-size-adjust: none; font-stretch: normal; color: #3d81ee;"><span style="font: 12px/18px arial, helvetica, sans-serif; color: #3d81ee; padding: 5px 5px 0;"><a href="http://plsql.globinch.com/2009/01/09/oracle-tables-create-table-with-foreign-key-constraint/" target="_self">Oracle/PLSQL: Create table with foreign key constraint</a><br />
<a href="http://plsql.globinch.com/2009/01/09/create-table-create-table-with-composite-primary-key/" target="_self">CREATE TABLE statement: create a table with composite primary key</a><br />
<a href="http://plsql.globinch.com/2009/01/09/oracle-tables-create-table-statement-create-a-table-with-primary-key/" target="_self">Oracle PL/SQL:CREATE TABLE statement: create a table with primary key.</a><br />
<a href="http://plsql.globinch.com/2009/01/09/oracle-tablescreate-table/" target="_self">Oracle PL/SQL:Create Table</a><br />
<a href="http://plsql.globinch.com/2009/01/09/oracle-tables-foreign-keys-with-on-delete-cascade-option/" target="_self">Oracle/PLSQL: Foreign Keys with ON DELETE CASCADE option</a><br />
<a href="http://plsql.globinch.com/2009/01/09/oracle-ora-02449-uniqueprimary-keys-in-table-referenced-by-foreign-keys/" target="_self">ORA-02449: unique/primary keys in table referenced by foreign </a><br />
<a href="http://plsql.globinch.com/2009/01/09/oracle-ora-02292-integrity-constraint-violated-child-record-found/" target="_self">ORA-02292: integrity constraint violated &#8211; child record found</a><br />
<a href="http://plsql.globinch.com/2009/01/09/ora-02291-integrity-constraint-violated-parent-key-not-found-2/">ORA-02291: integrity constraint violated &#8211; parent key not <span style="text-decoration: underline;">Found</span></a><br />
<a href="http://plsql.globinch.com/2009/01/09/oracle-tables-foreign-keys-oracle-referential-integrity/">Oracle/PLSQL: Foreign Keys | Oracle Referential <span style="text-decoration: underline;">Integrity</span></a><br />
<a href="http://plsqlworld.blogspot.com/2009/01/oracleplsql-composite-primary-key.html"></a><a href="http://plsqlworld.blogspot.com/2008/11/alter-table-to-add-primary-key-in.html"><br />
</a></span></span></p>
<p style="font-size: 9px;">Technorati Tags:<br />
<a title="Link to Technorati Tag category for Create Table as Select" rel="tag" href="http://www.technorati.com/tag/Create+Table+as+Select" target="_blank">Create Table as Select</a></p>
<div style="clear:both;">&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://plsql.globinch.com/2009/01/09/oracle-tables-create-table-as-select/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Oracle Tables: Create table with foreign key constraint</title>
		<link>http://plsql.globinch.com/2009/01/09/oracle-tables-create-table-with-foreign-key-constraint/</link>
		<comments>http://plsql.globinch.com/2009/01/09/oracle-tables-create-table-with-foreign-key-constraint/#comments</comments>
		<pubDate>Fri, 09 Jan 2009 10:40:00 +0000</pubDate>
		<dc:creator>globinch-sql-plsql</dc:creator>
				<category><![CDATA[Constraints]]></category>
		<category><![CDATA[Fundamentals]]></category>
		<category><![CDATA[Key Words]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Tables]]></category>

		<guid isPermaLink="false">http://plsql.globinch.com/?p=69</guid>
		<description><![CDATA[Usage Create table statement with foreign key constraint will create table with referential integrity.
Foreign Key holds the reference to another table column value.]]></description>
			<content:encoded><![CDATA[<!--S-ButtonZ 1.1.5 Start--><div style="float: left; width: 50px; padding-right: 10px; margin: 0 10px 0 0;">
		<script type="text/javascript">
		<!--
		yahooBuzzArticleHeadline = "Oracle Tables: Create table with foreign key constraint";
		yahooBuzzArticleCategory = "";
		yahooBuzzArticleType = "text";
		yahooBuzzArticleId = "http://plsql.globinch.com/2009/01/09/oracle-tables-create-table-with-foreign-key-constraint/";
		yahooBuzzArticleSummary = "";
		//-->
		</script>
		<script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype="square"> </script></div><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fplsql.globinch.com%2F2009%2F01%2F09%2Foracle-tables-create-table-with-foreign-key-constraint%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fplsql.globinch.com%2F2009%2F01%2F09%2Foracle-tables-create-table-with-foreign-key-constraint%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Usage <a href="http://plsql.globinch.com/2009/01/09/oracle-tablescreate-table/"><span style="font-weight: bold;">Create table</span></a> statement with <a href="http://plsql.globinch.com/2009/01/09/oracle-tables-create-table-with-foreign-key-constraint/">foreign key constraint</a> will create table with <a href="http://plsql.globinch.com/2009/01/09/oracle-tables-foreign-keys-oracle-referential-integrity/">referential integrity</a>.<br />
Foreign Key holds the reference to another table column value.It is also known as references constraint.<br />
A foreign key means that values in one table must also appear in another table.A references constraint is only applied at SQL &#8216;insert&#8217; and &#8216;delete&#8217; times.<br />
A foreign key can be defined in either a <a href="http://plsql.globinch.com/2009/01/09/oracle-tablescreate-table/">CREATE TABLE </a>statement or an <a href="http://plsql.globinch.com/2009/01/13/oracle-alter-table-to-add-columns/">ALTER TABLE</a> statement.</p>
<p>Let us create an EMPLOYEE table which holds the employee information like name ,id and salary.<br />
Here emp_id is the <a href="http://plsql.globinch.com/2009/01/09/oracle-tables-create-table-statement-create-a-table-with-primary-key/">primary key</a> column.</p>
<pre class="brush: css;">
SQL&gt; create table EMPLOYEE(name VARCHAR2(50),emp_id NUMBER,salary NUMBER(8,2), CONSTRAINT EMPLOYEE_ID_PK PRIMARY KEY (emp_id));

Table created
</pre>
<p>Now create an Employee address table which holds the address details of the employees.The address table is linked to EMPLOYEE table through the <a href="http://plsqlworld.blogspot.com/2009/01/oracleplsql-foreign-keys-oracle.html">foreign key </a>emp_id;</p>
<pre class="brush: css;">
SQL&gt; create table EMPLOYEE_ADDRESS(address varchar2(200),emp_id number,CONSTRAINT EMP_ADD_FK FOREIGN KEY (emp_id) REFERENCES EMPLOYEE(emp_id));

Table created
</pre>
<p>Now let us insert one record in EMPLOYEE table.</p>
<pre class="brush: css;">
SQL&gt; insert into EMPLOYEE values('ABCD',1,12345);

1 row inserted
</pre>
<p>Now let us add address for this particular employee in EMPLOYEE_ADDRESS table.</p>
<pre class="brush: css;">
SQL&gt; insert into EMPLOYEE_ADDRESS values('abcd efgh',1);

1 row inserted
</pre>
<p>Now while entering the data in EMPLOYEE_ADDRESS table the data <span style="font-weight: bold;">should be already present</span> in EMPLOYEE table.Otherwise foreign key violation will result.</p>
<pre class="brush: css;">
SQL&gt; insert into EMPLOYEE_ADDRESS values('abcd efgh',8);
ORA-02291: integrity constraint (TEST.EMP_ADD_FK) violated - parent key not found
</pre>
<p><a href="http://plsqlworld.blogspot.com/2009/01/ora-02291-integrity-constraint-violated.html">ORA-02291: integrity constraint (TEST.EMP_ADD_FK) violated &#8211; parent key not found</a></p>
<p>Also if we delete a row from the EMPLOYEE table and if a reference exists in EMPLOYEE_ADDRESS table oracle will throw an error showing reference integrity dependency.</p>
<pre class="brush: css;">
SQL&gt; delete from EMPLOYEE where emp_id =1;
ORA-02292: integrity constraint (TEST.EMP_ADD_FK) violated - child record found
</pre>
<p><a href="http://plsqlworld.blogspot.com/2009/01/ora-02292-integrity-constraint-violated.html">ORA-02292: integrity constraint (TEST.EMP_ADD_FK) violated &#8211; child record found</a><br />
<span style="margin: 0px; padding: 5px 5px 0px; overflow: auto; clear: both; display: block; width: auto; font-family: arial,helvetica,sans-serif; font-style: normal; font-variant: normal; font-size: 13px; line-height: 18px; font-size-adjust: none; font-stretch: normal; font-weight: bold; color: #cc0033;">Also Read,</span><a href="http://plsql.globinch.com/2009/01/09/create-table-create-table-with-composite-primary-key/">CREATE TABLE statement: create a table with composite primary key</a></p>
<p style="font-size: 9px;"><span style="margin: 5px; padding: 5px 5px 0pt; overflow: auto; clear: both; display: block; width: auto; background-color: #f8f8f8; font-family: arial,helvetica,sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: 18px; font-size-adjust: none; font-stretch: normal; color: #3d81ee;"><span style="font: 12px/18px arial, helvetica, sans-serif; color: #3d81ee; padding: 5px 5px 0;"><a href="http://plsql.globinch.com/2009/01/09/oracle-tables-create-table-statement-create-a-table-with-primary-key/">Oracle PL/SQL:CREATE TABLE statement: create a table with primary key.</a><br />
<a href="http://plsql.globinch.com/2009/01/09/oracle-tablescreate-table/">Oracle PL/SQL:Create Table</a><br />
<a href="http://plsql.globinch.com/2009/01/09/oracle-tables-foreign-keys-with-on-delete-cascade-option/">Oracle/PLSQL: Foreign Keys with ON DELETE CASCADE option</a><br />
<a href="http://plsql.globinch.com/2009/01/09/oracle-ora-02449-uniqueprimary-keys-in-table-referenced-by-foreign-keys/">ORA-02449: unique/primary keys in table referenced by foreign keys</a><br />
<a href="http://plsql.globinch.com/2009/01/09/oracle-ora-02292-integrity-constraint-violated-child-record-found/">ORA-02292: integrity constraint violated &#8211; child record found</a><br />
<a href="http://plsql.globinch.com/2009/01/09/ora-02291-integrity-constraint-violated-parent-key-not-found-2/">ORA-02291: integrity constraint violated &#8211; parent key not <span style="text-decoration: underline;">Found</span></a><br />
<a href="http://plsql.globinch.com/2009/01/09/oracle-tables-foreign-keys-oracle-referential-integrity/">Oracle/PLSQL: Foreign Keys | Oracle Referential <span style="text-decoration: underline;">Integrity</span></a><br />
<a href="http://plsql.globinch.com/2009/01/09/composite-primary-key-in-oracle/">Oracle/PLSQL: Composite Primary Key</a><br />
<a href="http://plsql.globinch.com/2009/01/09/oracle-primary-key-and-composite-primary-key/">Oracle/PLSQL: Primary Key and Composite Primary Key</a><br />
<a href="http://plsqlworld.blogspot.com/2008/11/alter-table-to-add-primary-key-in.html"></a></span></span>Technorati Tags:<br />
<a title="Link to Technorati Tag category for CREATE TABLE" rel="tag" href="http://www.technorati.com/tag/CREATE+TABLE" target="_blank">CREATE TABLE</a>, <a title="Link to Technorati Tag category for create a table with primary key" rel="tag" href="http://www.technorati.com/tag/create+a+table+with+primary+key" target="_blank">create a table with primary key</a>, <a title="Link to Technorati Tag category for oracle primary key" rel="tag" href="http://www.technorati.com/tag/oracle+foreign+key" target="_blank">oracle foreign key</a></p>
<div style="clear:both;">&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://plsql.globinch.com/2009/01/09/oracle-tables-create-table-with-foreign-key-constraint/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>&#8216;CREATE TABLE&#8217; : create table with composite primary key</title>
		<link>http://plsql.globinch.com/2009/01/09/create-table-create-table-with-composite-primary-key/</link>
		<comments>http://plsql.globinch.com/2009/01/09/create-table-create-table-with-composite-primary-key/#comments</comments>
		<pubDate>Fri, 09 Jan 2009 10:38:00 +0000</pubDate>
		<dc:creator>globinch-sql-plsql</dc:creator>
				<category><![CDATA[Fundamentals]]></category>
		<category><![CDATA[Key Words]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Tables]]></category>

		<guid isPermaLink="false">http://plsql.globinch.com/?p=68</guid>
		<description><![CDATA['CREATE TABLE' : sql create table command with composite primary key.CREATE TABLE statement can be used to create table objects in database. It is possible to add constraints like primary key ,foreign key while table creation.Primary key is the unique identifier for a row of data.]]></description>
			<content:encoded><![CDATA[<!--S-ButtonZ 1.1.5 Start--><div style="float: left; width: 50px; padding-right: 10px; margin: 0 10px 0 0;">
		<script type="text/javascript">
		<!--
		yahooBuzzArticleHeadline = "&#8216;CREATE TABLE&#8217; : create table with composite primary key";
		yahooBuzzArticleCategory = "";
		yahooBuzzArticleType = "text";
		yahooBuzzArticleId = "http://plsql.globinch.com/2009/01/09/create-table-create-table-with-composite-primary-key/";
		yahooBuzzArticleSummary = "";
		//-->
		</script>
		<script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype="square"> </script></div><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fplsql.globinch.com%2F2009%2F01%2F09%2Fcreate-table-create-table-with-composite-primary-key%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fplsql.globinch.com%2F2009%2F01%2F09%2Fcreate-table-create-table-with-composite-primary-key%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://plsql.globinch.com/2009/01/09/oracle-tablescreate-table/"><span style="font-weight: bold;">CREATE TABLE</span></a> statement can be used to create table objects in database. It is possible to add constraints like primary key<a href="http://plsqlworld.blogspot.com/2009/01/oracle-plsqlcreate-table-statement.html"> </a>,<a href="http://plsqlworld.blogspot.com/2009/01/oracleplsql-foreign-keys-with-on-delete.html">foreign key</a> while table creation.<a href="http://plsql.globinch.com/2009/01/06/oracleplsql-primary-key-and-composite-primary-key/">Primary key</a> is the unique identifier for a row of data.One table cannot contain duplicate primary key values.Primary key also can be a combination of columns (<a href="http://plsql.globinch.com/2009/01/09/composite-primary-key-in-oracle/">COMPOSITE Primary Key</a>).</p>
<p>The below given example uses <a href="http://plsql.globinch.com/2009/01/09/oracle-tables-create-table-statement-create-a-table-with-primary-key/">CREATE TABLE</a> statement to create a table with a<a href="http://plsql.globinch.com/2009/01/09/oracle-tables-create-table-statement-create-a-table-with-primary-key/"> single column primary key</a>.</p>
<pre class="brush: css;">
SQL&gt; create table MYTABLE(
name VARCHAR2(50),
id NUMBER,
salary NUMBER(8,2),
CONSTRAINT MYTABLE_ID PRIMARY KEY (id)
);

Table created
</pre>
<p>Now let us INSERT few records into MYTABLE.</p>
<pre class="brush: css;">
SQL&gt; insert into MYTABLE values ('CCC',1,2548.21);
SQL&gt; insert into MYTABLE values ('ADS',2,3548.21);
SQL&gt; insert into MYTABLE values ('GDS',2,1548.21);

SQL&gt; select * from MYTABLE ORDER BY SALARY;

NAME   ID  SALARY

GDS   2    1548.21
CCC   1    2548.21
ADS   2    3548.21
</pre>
<p>The below given example uses CREATE TABLE statement to create a table with a multiple column <a href="http://plsql.globinch.com/2009/01/09/create-table-create-table-with-composite-primary-key/">primary key (COMPOSITE Primary KEY).</a></p>
<pre class="brush: css;">
SQL&gt; drop table mytable;
Table dropped

SQL&gt; create table MYTABLE(
name VARCHAR2(50),
id NUMBER,
salary NUMBER(8,2),
CONSTRAINT MYTABLE_NAME_ID_PK PRIMARY KEY (name,id)
);

Table created
</pre>
<p>Now let us INSERT few records into MYTABLE.</p>
<pre class="brush: css;">
SQL&gt; insert into MYTABLE values ('CCC',1,2548.21);
SQL&gt; insert into MYTABLE values ('ADS',2,3548.21);
SQL&gt; insert into MYTABLE values ('GDS',2,1548.21);

SQL&gt; select * from MYTABLE ORDER BY SALARY;

NAME   ID  SALARY
GDS   2    1548.21
CCC   1    2548.21
ADS   2    3548.21
</pre>
<p>&gt;<span style="margin: 0px; padding: 5px 5px 0px; overflow: auto; clear: both; display: block; width: auto; font-family: arial,helvetica,sans-serif; font-style: normal; font-variant: normal; font-size: 13px; line-height: 18px; font-size-adjust: none; font-stretch: normal; font-weight: bold; color: #cc0033;">Also Read,</span></p>
<p><a href="../2009/01/09/oracle-tables-create-table-statement-create-a-table-with-primary-key/">Oracle PL/SQL:CREATE TABLE statement: create a table with primary key.</a><br />
<a href="../2009/01/09/oracle-tablescreate-table/">Oracle PL/SQL:Create Table</a><br />
<a href="../2009/01/09/oracle-tables-foreign-keys-with-on-delete-cascade-option/">Oracle/PLSQL: Foreign Keys with ON DELETE CASCADE option</a><br />
<a href="../2009/01/09/oracle-ora-02449-uniqueprimary-keys-in-table-referenced-by-foreign-keys/">ORA-02449: unique/primary keys in table referenced by foreign keys</a><br />
<a href="../2009/01/09/oracle-ora-02292-integrity-constraint-violated-child-record-found/">ORA-02292: integrity constraint violated – child record found</a><br />
<a href="../2009/01/09/ora-02291-integrity-constraint-violated-parent-key-not-found-2/">ORA-02291: integrity constraint violated – parent key not Found</a><br />
<a href="../2009/01/09/oracle-tables-foreign-keys-oracle-referential-integrity/">Oracle/PLSQL: Foreign Keys | Oracle Referential Integrity</a><br />
<a href="../2009/01/09/composite-primary-key-in-oracle/">Oracle/PLSQL: Composite Primary Key</a><br />
<a href="../2009/01/09/oracle-primary-key-and-composite-primary-key/">Oracle/PLSQL: Primary Key and Composite Primary Key</a></p>
<p style="font-size: 9px;">Technorati Tags:<br />
<a title="Link to Technorati Tag category for CREATE TABLE" rel="tag" href="http://www.technorati.com/tag/CREATE+TABLE" target="_blank">CREATE TABLE</a>, <a title="Link to Technorati Tag category for create a table with primary key" rel="tag" href="http://www.technorati.com/tag/create+a+table+with+primary+key" target="_blank">create a table with primary key</a>, <a title="Link to Technorati Tag category for oracle primary key" rel="tag" href="http://www.technorati.com/tag/oracle+composite+primary+key" target="_blank">oracle composite primary key</a></p>
<div style="clear:both;">&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://plsql.globinch.com/2009/01/09/create-table-create-table-with-composite-primary-key/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

