<?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"
	>

<channel>
	<title>Technical Interview Questions &#187; Oracle Interview Questions</title>
	<atom:link href="http://www.technicalinterview.info/category/oracle-interview-questions/feed" rel="self" type="application/rss+xml" />
	<link>http://www.technicalinterview.info</link>
	<description>Java Interview Questions &#124; IT interview questions &#124; Software Testing Interview questions &#124; .Net Interview Questions &#124; Job Interview Questions &#38; Answers &#124; Tough Interview Questions &#124; Technology Interview Questions &#124; Tech Interview Questions &#124; Testing Interview Questions &#124; SAP Interview Questions &#124; ABAP Interview Questions &#124; Data Warehousing Interview Questions</description>
	<pubDate>Tue, 02 Sep 2008 08:33:19 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Oracle Interview Questions-II</title>
		<link>http://www.technicalinterview.info/oracle-interview-questions-ii/</link>
		<comments>http://www.technicalinterview.info/oracle-interview-questions-ii/#comments</comments>
		<pubDate>Thu, 13 Sep 2007 07:21:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Oracle Interview Questions]]></category>

		<guid isPermaLink="false">http://www.technicalinterview.info/oracle-interview-questions-ii/</guid>
		<description><![CDATA[Display the records between two range
select rownum, empno, ename  from emp  where  rowid in (select rowid from emp where rownum &#60;=&#38;upto minus select rowid from emp where rownum&#60; &#38;Start);
Enter value for upto: 10
Enter value for Start: 7
ROWNUM     EMPNO ENAME
&#8212;&#8212;&#8212; &#8212;&#8212;&#8212; &#8212;&#8212;&#8212;-
1      7782 CLARK
2 [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Display the records between two range</strong></p>
<p>select rownum, empno, ename  from emp  where  rowid in (select rowid from emp where rownum &lt;=&amp;upto minus select rowid from emp where rownum&lt; &amp;Start);<br />
Enter value for upto: 10<br />
Enter value for Start: 7<br />
ROWNUM     EMPNO ENAME<br />
&#8212;&#8212;&#8212; &#8212;&#8212;&#8212; &#8212;&#8212;&#8212;-<br />
1      7782 CLARK<br />
2      7788 SCOTT<br />
3      7839 KING<br />
4      7844 TURNER</p>
<p><strong>I know the nvl function only allows the same data type(ie. number or char or date Nvl(comm, 0)), if commission is null then the text “Not Applicable” want to display, instead of blank space. How do I write the query?</strong></p>
<p>SQL&gt; select nvl(to_char(comm.),&#8217;NA&#8217;) from emp;<br />
Output :<br />
NVL(TO_CHAR(COMM),&#8217;NA&#8217;)<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
NA<br />
300<br />
500<br />
NA<br />
1400<br />
NA<br />
NA</p>
<p><strong>Oracle cursor : Implicit &amp; Explicit cursors</strong></p>
<p>Oracle uses work areas called private SQL areas to create SQL statements. PL/SQL construct to identify each and every work are used, is called as Cursor. For SQL queries returning a single row, PL/SQL declares all implicit cursors. For queries that returning more than one row, the cursor needs to be explicitly declared.</p>
<p><strong>Explicit Cursor attributes</strong></p>
<p>There are four cursor attributes used in Oracle<br />
cursor_name%Found, cursor_name%NOTFOUND, cursor_name%ROWCOUNT, cursor_name%ISOPEN</p>
<p><strong>Implicit Cursor attributes</strong></p>
<p>Same as explicit cursor but prefixed by the word SQL<br />
SQL%Found, SQL%NOTFOUND, SQL%ROWCOUNT, SQL%ISOPEN<br />
Tips : 1. Here SQL%ISOPEN is false, because oracle automatically closed the implicit cursor after executing SQL statements.<br />
: 2.  All are  Boolean attributes.</p>
<p><strong>Find out nth highest salary from emp table</strong></p>
<p>SELECT DISTINCT (a.sal) FROM EMP A WHERE &amp;N = (SELECT COUNT (DISTINCT (b.sal)) FROM EMP B WHERE a.sal&lt;=b.sal);<br />
Enter value for n: 2<br />
SAL<br />
&#8212;&#8212;&#8212;<br />
3700</p>
]]></content:encoded>
			<wfw:commentRss>http://www.technicalinterview.info/oracle-interview-questions-ii/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Oracle Interview Questions-1</title>
		<link>http://www.technicalinterview.info/oracle-interview-questions-1/</link>
		<comments>http://www.technicalinterview.info/oracle-interview-questions-1/#comments</comments>
		<pubDate>Fri, 07 Sep 2007 15:21:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Oracle Interview Questions]]></category>

		<guid isPermaLink="false">http://www.technicalinterview.info/oracle-interview-questions-1/</guid>
		<description><![CDATA[1.To see current user name
Sql> show user;
2.Change SQL prompt name
SQL> set sqlprompt “Manimara > “
Manimara >
Manimara >
3.Switch to DOS prompt
SQL> host
4.How do I eliminate the duplicate rows ?
SQL> delete from table_name where rowid not in (select max(rowid) from table group by duplicate_values_field_name);
or
SQL> delete from table_name ta where rowid >(select min(rowid) from table_name tb where ta.dv=tb.dv [...]]]></description>
			<content:encoded><![CDATA[<p><strong>1.To see current user name</strong></p>
<p>Sql> show user;</p>
<p><strong>2.Change SQL prompt name</strong><br />
SQL> set sqlprompt “Manimara > “<br />
Manimara ><br />
Manimara ></p>
<p><strong>3.Switch to DOS prompt</strong></p>
<p>SQL> host</p>
<p><strong>4.How do I eliminate the duplicate rows ?</strong></p>
<p>SQL> delete from table_name where rowid not in (select max(rowid) from table group by duplicate_values_field_name);<br />
or<br />
SQL> delete from table_name ta where rowid >(select min(rowid) from table_name tb where ta.dv=tb.dv and &#8230;..);<br />
Example.<br />
Table Emp<br />
Empno Ename<br />
101 Scott<br />
102 Jiyo<br />
103 Millor<br />
104 Jiyo<br />
105 Smith<br />
delete from emp a where rowid < ( select max(rowid) from emp b where a.ename = b.ename );<br />
The output like,<br />
Empno Ename<br />
101 Scott<br />
103 Millor<br />
104 Jiyo<br />
105 Smith</p>
<p><strong>5.How do I display row number with records?</strong></p>
<p>To achive this use rownum pseudocolumn with query, like SQL> SQL> select rownum, ename from emp;<br />
Output:<br />
1 Scott<br />
2 Millor<br />
3 Jiyo<br />
4 Smith</p>
]]></content:encoded>
			<wfw:commentRss>http://www.technicalinterview.info/oracle-interview-questions-1/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Oracle Interview Questions</title>
		<link>http://www.technicalinterview.info/oracle-interview-questions/</link>
		<comments>http://www.technicalinterview.info/oracle-interview-questions/#comments</comments>
		<pubDate>Fri, 07 Sep 2007 15:19:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Oracle Interview Questions]]></category>

		<guid isPermaLink="false">http://www.technicalinterview.info/oracle-interview-questions/</guid>
		<description><![CDATA[1. What are the components of physical database structure of Oracle database?
Oracle database is comprised of three types of files. One or more datafiles, two are more redo log files, and one or more control files.
2. What are the components of logical database structure of Oracle database?
There are tablespaces and database&#8217;s schema objects.
3. What is [...]]]></description>
			<content:encoded><![CDATA[<p><strong>1. What are the components of physical database structure of Oracle database?</strong></p>
<p>Oracle database is comprised of three types of files. One or more datafiles, two are more redo log files, and one or more control files.</p>
<p><strong>2. What are the components of logical database structure of Oracle database?</strong></p>
<p>There are tablespaces and database&#8217;s schema objects.</p>
<p><strong>3. What is a tablespace?</strong></p>
<p>A database is divided into Logical Storage Unit called tablespaces. A tablespace is used to grouped related logical structures together.</p>
<p><strong>4. What is SYSTEM tablespace and when is it created?</strong></p>
<p>Every Oracle database contains a tablespace named SYSTEM, which is automatically created when the database is created. The SYSTEM tablespace always contains the data dictionary tables for the entire database.</p>
<p><strong>5. Explain the relationship among database, tablespace and data file.</strong></p>
<p>Each databases logically divided into one or more tablespaces one or more data files are explicitly created for each tablespace.</p>
<p><strong>6. What is schema?</strong></p>
<p>A schema is collection of database objects of a user.</p>
<p><strong>7. What are Schema Objects?</strong></p>
<p>Schema objects are the logical structures that directly refer to the database&#8217;s data. Schema objects include tables, views, sequences, synonyms, indexes, clusters, database triggers, procedures, functions packages and database links.</p>
<p><strong>8. Can objects of the same schema reside in different tablespaces?</strong></p>
<p>Yes.</p>
<p><strong>9. Can a tablespace hold objects from different schemes?</strong></p>
<p>Yes.</p>
<p><strong>10. What is Oracle table?</strong></p>
<p>A table is the basic unit of data storage in an Oracle database. The tables of a database hold all of the user accessible data. Table data is stored in rows and columns.</p>
<p><strong>11. What is an Oracle view?</strong></p>
<p>A view is a virtual table. Every view has a query attached to it. (The query is a SELECT statement that identifies the columns and rows of the table(s) the view uses.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.technicalinterview.info/oracle-interview-questions/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
