<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Interviewfaqs's jobportal</title>
	<atom:link href="http://interviewfaqs.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://interviewfaqs.wordpress.com</link>
	<description>java,j2ee,Dot.net,Freshers,Hr,Oracle,Testing interview questions</description>
	<lastBuildDate>Thu, 29 Nov 2007 18:43:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='interviewfaqs.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Interviewfaqs's jobportal</title>
		<link>http://interviewfaqs.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://interviewfaqs.wordpress.com/osd.xml" title="Interviewfaqs&#039;s jobportal" />
	<atom:link rel='hub' href='http://interviewfaqs.wordpress.com/?pushpress=hub'/>
		<item>
		<title>DB2 interview questions-10</title>
		<link>http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-10/</link>
		<comments>http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-10/#comments</comments>
		<pubDate>Mon, 19 Nov 2007 17:24:59 +0000</pubDate>
		<dc:creator>interviewfaqs</dc:creator>
				<category><![CDATA[DB2]]></category>

		<guid isPermaLink="false">http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-10/</guid>
		<description><![CDATA[ What is a DBRM, PLAN ? DBRM: DataBase Request Module, has the SQL statements extracted from the host language program by the pre-compiler. PLAN: A result of the BIND process. It has the executable code for the SQL statements in the DBRM. What is ACQUIRE/RELEASE in BIND? Determine the point at which DB2 acquires or [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=interviewfaqs.wordpress.com&amp;blog=1949925&amp;post=183&amp;subd=interviewfaqs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong><span> </span>What is a DBRM, PLAN ?</strong></p>
<p>DBRM: DataBase Request Module, has the SQL statements extracted from the host language program by the pre-compiler.</p>
<p>PLAN: A result of the BIND process. It has the executable code for the SQL statements in the DBRM.</p>
<p><strong>What is ACQUIRE/RELEASE in BIND?</strong></p>
<p>Determine the point at which DB2 acquires or releases locks against table and tablespaces, including intent locks.</p>
<p><strong>What else is there in the PLAN apart from the access path?</strong></p>
<p>PLAN has the executable code for the SQL statements in the host program</p>
<p><strong>What happens to the PLAN if index used by it is dropped?</strong></p>
<p>Plan is marked as invalid. The next time the plan is accessed, it is rebound.</p>
<p><strong>What are PACKAGES ?</strong></p>
<p>They contain executable code for SQL statements for one DBRM.</p>
<p><strong>What are the advantages of using a PACKAGE?</strong></p>
<p>1. Avoid having to bind a large number of DBRM members into a plan</p>
<p>2. Avoid cost of a large bind</p>
<p>3. Avoid the entire transaction being unavailable during bind and automatic rebind of a plan</p>
<p>4. Minimize fallback complexities if changes result in an error.</p>
<p><strong>What is a collection?</strong></p>
<p>a user defined name that is the anchor for packages. It has not physical existence. Main usage is to group packages.</p>
<p>In SPUFI suppose you want to select max. of 1000 rows , but the select returns only 200 rows.</p>
<p><strong>What are the 2 sqlcodes that are returned?</strong></p>
<p>100 ( for successful completion of the query ), 0 (for successful COMMIT if AUTOCOMMIT is set to Yes).</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/interviewfaqs.wordpress.com/183/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/interviewfaqs.wordpress.com/183/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/interviewfaqs.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/interviewfaqs.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/interviewfaqs.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/interviewfaqs.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/interviewfaqs.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/interviewfaqs.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/interviewfaqs.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/interviewfaqs.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/interviewfaqs.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/interviewfaqs.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/interviewfaqs.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/interviewfaqs.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/interviewfaqs.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/interviewfaqs.wordpress.com/183/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=interviewfaqs.wordpress.com&amp;blog=1949925&amp;post=183&amp;subd=interviewfaqs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/269a6e3240df248cd40152679df67c7c?s=96&#38;d=identicon" medium="image">
			<media:title type="html">interviewfaqs</media:title>
		</media:content>
	</item>
		<item>
		<title>DB2 interview questions-9</title>
		<link>http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-9/</link>
		<comments>http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-9/#comments</comments>
		<pubDate>Mon, 19 Nov 2007 17:23:38 +0000</pubDate>
		<dc:creator>interviewfaqs</dc:creator>
				<category><![CDATA[DB2]]></category>

		<guid isPermaLink="false">http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-9/</guid>
		<description><![CDATA[What are the disadvantages of PAGE level lock? High resource utilization if large updates are to be done What is lock escalation? Promoting a PAGE lock-size to table or tablespace lock-size when a transaction has acquired more locks than specified in NUMLKTS. Locks should be taken on objects in single tablespace for escalation to occur. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=interviewfaqs.wordpress.com&amp;blog=1949925&amp;post=182&amp;subd=interviewfaqs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<table class="MsoNormalTable" border="0" cellpadding="0">
<tr>
<td style="padding:0.75pt;"><strong>What are the disadvantages of PAGE level lock?</strong></p>
<p>High resource utilization if large updates are to be done<strong></strong></p>
<p style="margin-right:-20.25pt;"><strong>What is lock escalation?</strong></p>
<p style="margin-right:-20.25pt;">Promoting a PAGE lock-size to table or   tablespace lock-size when a transaction has acquired more locks than   specified in NUMLKTS. Locks should be taken on objects in single tablespace   for escalation to occur.</p>
<p style="margin-right:-20.25pt;">&nbsp;</p>
<p><strong>What are the various locks available?</strong></p>
<p>SHARE, EXCLUSIVE, UPDATE</p>
<p><strong>Can I use LOCK TABLE on a view?</strong></p>
<p>No. To lock a view, take lock on the underlying tables.</p>
<p><strong>What is ALTER ?</strong></p>
<p style="margin-right:-20.25pt;">&nbsp;</p>
</td>
</tr>
</table>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/interviewfaqs.wordpress.com/182/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/interviewfaqs.wordpress.com/182/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/interviewfaqs.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/interviewfaqs.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/interviewfaqs.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/interviewfaqs.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/interviewfaqs.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/interviewfaqs.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/interviewfaqs.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/interviewfaqs.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/interviewfaqs.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/interviewfaqs.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/interviewfaqs.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/interviewfaqs.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/interviewfaqs.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/interviewfaqs.wordpress.com/182/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=interviewfaqs.wordpress.com&amp;blog=1949925&amp;post=182&amp;subd=interviewfaqs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/269a6e3240df248cd40152679df67c7c?s=96&#38;d=identicon" medium="image">
			<media:title type="html">interviewfaqs</media:title>
		</media:content>
	</item>
		<item>
		<title>DB2 interview questions-8</title>
		<link>http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-8/</link>
		<comments>http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-8/#comments</comments>
		<pubDate>Mon, 19 Nov 2007 17:02:54 +0000</pubDate>
		<dc:creator>interviewfaqs</dc:creator>
				<category><![CDATA[DB2]]></category>

		<guid isPermaLink="false">http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-8/</guid>
		<description><![CDATA[How do you simulate the EXPLAIN of an embedded SQL statement in SPUFI/QMF? Give an example with a host variable in WHERE clause.) Use a question mark in place of a host variable ( or an unknown value ). e.g. SELECT EMP_NAME FROM EMP WHERE EMP_SALARY &#62; ?  What are the isolation levels possible ? [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=interviewfaqs.wordpress.com&amp;blog=1949925&amp;post=179&amp;subd=interviewfaqs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>How do you simulate the EXPLAIN of an embedded SQL statement in SPUFI/QMF? Give an example with a host variable in WHERE clause.) </strong></p>
<p>Use a question mark in place of a host variable ( or an unknown value ). e.g.</p>
<p>SELECT EMP_NAME</p>
<p>FROM EMP</p>
<p>WHERE EMP_SALARY &gt; ?</p>
<p><strong><span> </span>What are the isolation levels possible ? </strong></p>
<p>CS: Cursor Stability</p>
<p>RR: Repeatable Read</p>
<p><strong><span> </span>What is the difference between CS and RR isolation levels? </strong></p>
<p>CS: Releases the lock on a page after use</p>
<p>RR: Retains all locks acquired till end of transaction</p>
<p><strong><span> </span>Where do you specify them ? </strong></p>
<p>ISOLATION LEVEL is a parameter for the bind process.</p>
<p><strong><span> </span>When do you specify the isolation level? How? </strong></p>
<p>During the BIND process. ISOLATION ( CS/RR )&#8230;</p>
<p>I use CS and update a page. Will the lock be released after I am done with that page? </p>
<p>No.</p>
<p><strong>What are the various locking levels available? </strong></p>
<p>PAGE, TABLE, TABLESPACE</p>
<p><strong><span> </span>How does DB2 determine what lock-size to use? </strong></p>
<p>1. Based on the lock-size given while creating the tablespace</p>
<p>2. Programmer can direct the DB2 what lock-size to use</p>
<p>3. If lock-size ANY is specified, DB2 usually chooses a lock-size of PAGE</p>
<p><strong><span style="font-size:12pt;font-family:'Times New Roman';"><span><br />
</span></span></strong></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/interviewfaqs.wordpress.com/179/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/interviewfaqs.wordpress.com/179/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/interviewfaqs.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/interviewfaqs.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/interviewfaqs.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/interviewfaqs.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/interviewfaqs.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/interviewfaqs.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/interviewfaqs.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/interviewfaqs.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/interviewfaqs.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/interviewfaqs.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/interviewfaqs.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/interviewfaqs.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/interviewfaqs.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/interviewfaqs.wordpress.com/179/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=interviewfaqs.wordpress.com&amp;blog=1949925&amp;post=179&amp;subd=interviewfaqs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/269a6e3240df248cd40152679df67c7c?s=96&#38;d=identicon" medium="image">
			<media:title type="html">interviewfaqs</media:title>
		</media:content>
	</item>
		<item>
		<title>DB2 interview questions-7</title>
		<link>http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-7/</link>
		<comments>http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-7/#comments</comments>
		<pubDate>Mon, 19 Nov 2007 17:00:05 +0000</pubDate>
		<dc:creator>interviewfaqs</dc:creator>
				<category><![CDATA[DB2]]></category>

		<guid isPermaLink="false">http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-7/</guid>
		<description><![CDATA[ Will precompile of an DB2-COBOL program bomb, if DB2 is down? No. Because the precompiler does not refer to the DB2 catalogue tables.  How is a typical DB2 batch pgm executed ? 1. Use DSN utility to run a DB2 batch program from native TSO. An example is shown: DSN SYSTEM(DSP3) RUN PROGRAM(EDD470BD) PLAN(EDD470BD) LIB(&#8216;ED [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=interviewfaqs.wordpress.com&amp;blog=1949925&amp;post=178&amp;subd=interviewfaqs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong><span> </span>Will precompile of an DB2-COBOL program bomb, if DB2 is down? </strong></p>
<p>No. Because the precompiler does not refer to the DB2 catalogue tables.</p>
<p><strong><span> </span>How is a typical DB2 batch pgm executed ? </strong></p>
<p>1. Use DSN utility to run a DB2 batch program from native TSO. An example is shown:</p>
<p>DSN SYSTEM(DSP3)</p>
<p>RUN PROGRAM(EDD470BD) PLAN(EDD470BD) LIB(&#8216;ED 01T.OBJ.LOADLIB&#8217;)</p>
<p>END</p>
<p>2. Use IKJEFT01 utility program to run the above DSN command in a JCL. </p>
<p>Assuming that a site’s standard is that pgm name = plan name, what is the easiest way to find out which pgms are affected by change in a table’s structure ? </p>
<p>Query the catalogue tables SYSPLANDEP and SYSPACKDEP.</p>
<p><strong><span> </span>Name some fields from SQLCA. </strong></p>
<p>SQLCODE, SQLERRM, SQLERRD</p>
<p><strong><span> </span>How can you quickly find out the # of rows updated after an update statement? </strong></p>
<p>Check the value stored in SQLERRD(3).</p>
<p><strong><span> </span>What is EXPLAIN? – drona questions</strong></p>
<p>EXPLAIN is used to display the access path as determined by the optimizer for a SQL statement. It can be used in SPUFI (for single SQL statement ) or in BIND step (for embedded SQL ).</p>
<p><strong><span> </span>What do you need to do before you do EXPLAIN? </strong></p>
<p>Make sure that the PLAN_TABLE is created under the AUTHID.</p>
<p><strong><span> </span>Where is the output of EXPLAIN stored? – </strong></p>
<p>In userid.PLAN_TABLE </p>
<p><strong><span> </span>EXPLAIN has output with MATCHCOLS = 0. What does it mean? – </strong></p>
<p>a nonmatching index scan if ACCESSTYPE = I.</p>
<p><strong><span> </span>How do you do the EXPLAIN of a dynamic SQL statement? </strong></p>
<p>1. Use SPUFI or QMF to EXPLAIN the dynamic SQL statement</p>
<p>2. Include EXPLAIN command in the embedded dynamic SQL statements</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/interviewfaqs.wordpress.com/178/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/interviewfaqs.wordpress.com/178/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/interviewfaqs.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/interviewfaqs.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/interviewfaqs.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/interviewfaqs.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/interviewfaqs.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/interviewfaqs.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/interviewfaqs.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/interviewfaqs.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/interviewfaqs.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/interviewfaqs.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/interviewfaqs.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/interviewfaqs.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/interviewfaqs.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/interviewfaqs.wordpress.com/178/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=interviewfaqs.wordpress.com&amp;blog=1949925&amp;post=178&amp;subd=interviewfaqs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/269a6e3240df248cd40152679df67c7c?s=96&#38;d=identicon" medium="image">
			<media:title type="html">interviewfaqs</media:title>
		</media:content>
	</item>
		<item>
		<title>DB2 interview questions-6</title>
		<link>http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-6/</link>
		<comments>http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-6/#comments</comments>
		<pubDate>Mon, 19 Nov 2007 16:59:23 +0000</pubDate>
		<dc:creator>interviewfaqs</dc:creator>
				<category><![CDATA[DB2]]></category>

		<guid isPermaLink="false">http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-6/</guid>
		<description><![CDATA[A VARCHAR column REMARKS would be defined as follows: 10 REMARKS. 49 REMARKS-LEN PIC S9(4) USAGE COMP. 49 REMARKS-TEXT PIC X(1920).  What is the physical storage length of each of the following DB2 data types: DATE, TIME, TIMESTAMP? DATE: 4bytes TIME: 3bytes TIMESTAMP: 10bytes  What is the COBOL picture clause of the following DB2 data [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=interviewfaqs.wordpress.com&amp;blog=1949925&amp;post=177&amp;subd=interviewfaqs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>A VARCHAR column REMARKS would be defined as follows:</strong></p>
<p>10 REMARKS.<strong></strong></p>
<p>49 REMARKS-LEN PIC S9(4) USAGE COMP.</p>
<p>49 REMARKS-TEXT PIC X(1920).</p>
<p><strong><span> </span>What is the physical storage length of each of the following DB2 data types: </strong></p>
<p><strong>DATE, TIME, TIMESTAMP?</strong></p>
<p>DATE: 4bytes</p>
<p>TIME: 3bytes</p>
<p>TIMESTAMP: 10bytes</p>
<p><strong><span> </span>What is the COBOL picture clause of the following DB2 data types: </strong></p>
<p><strong>DATE, TIME, TIMESTAMP?</strong></p>
<p>DATE: PIC X(10)</p>
<p>TIME : PIC X(08)</p>
<p>TIMESTAMP: PIC X(26)</p>
<p><strong><span> </span>What is the COBOL picture clause for a DB2 column defined as DECIMAL(11,2)? &#8211; Ramesh </strong></p>
<p>PIC S9(9)V99 COMP-3.</p>
<p>Note: In DECIMAL(11,2), 11 indicates the size of the data type and 2 indicates the precision.</p>
<p><strong><span> </span>What is DCLGEN ? &#8211; </strong></p>
<p>DeCLarations GENerator: used to create the host language copy books for the table definitions. Also creates the DECLARE table.</p>
<p><strong><span> </span>What are the contents of a DCLGEN? &#8211; </strong></p>
<p>1. EXEC SQL DECLARE TABLE statement which gives the layout of the table/view in terms of DB2 datatypes.</p>
<p>2. A host language copy book that gives the host variable definitions for the column names.</p>
<p><strong><span> </span>Is it mandatory to use DCLGEN? If not, why would you use it at all? &#8211; </strong></p>
<p>It is not mandatory to use DCLGEN. </p>
<p>Using DCLGEN, helps detect wrongly spelt column names etc. during the pre-compile stage itself ( because of the DECLARE TABLE ). DCLGEN being a tool, would generate accurate host variable definitions for the table reducing chances of error.</p>
<p><strong><span> </span>Is DECLARE TABLE in DCLGEN necessary? Why it used? </strong></p>
<p>It not necessary to have DECLARE TABLE statement in DCLGEN. This is used by the pre-compiler to validate the table-name, view-name, column name etc., during pre-compile.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/interviewfaqs.wordpress.com/177/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/interviewfaqs.wordpress.com/177/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/interviewfaqs.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/interviewfaqs.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/interviewfaqs.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/interviewfaqs.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/interviewfaqs.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/interviewfaqs.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/interviewfaqs.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/interviewfaqs.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/interviewfaqs.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/interviewfaqs.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/interviewfaqs.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/interviewfaqs.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/interviewfaqs.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/interviewfaqs.wordpress.com/177/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=interviewfaqs.wordpress.com&amp;blog=1949925&amp;post=177&amp;subd=interviewfaqs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/269a6e3240df248cd40152679df67c7c?s=96&#38;d=identicon" medium="image">
			<media:title type="html">interviewfaqs</media:title>
		</media:content>
	</item>
		<item>
		<title>DB2 interview questions-5</title>
		<link>http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-5/</link>
		<comments>http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-5/#comments</comments>
		<pubDate>Mon, 19 Nov 2007 16:58:04 +0000</pubDate>
		<dc:creator>interviewfaqs</dc:creator>
				<category><![CDATA[DB2]]></category>

		<guid isPermaLink="false">http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-5/</guid>
		<description><![CDATA[What are correlated subqueries? A subquery in which the inner ( nested ) query refers back to the table in the outer query. Correlated subqueries must be evaluated for each qualified row of the outer query that is referred to.  What is a cursor? why should it be used?   Cursor is a programming device [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=interviewfaqs.wordpress.com&amp;blog=1949925&amp;post=176&amp;subd=interviewfaqs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>What are correlated subqueries? </strong></p>
<p>A subquery in which the inner ( nested ) query refers back to the table in the outer query. Correlated subqueries must be evaluated for each qualified row of the outer query that is referred to.</p>
<p><strong><span> </span>What is a cursor? why should it be used? <span> </span></strong></p>
<p>Cursor is a programming device that allows the SELECT to find a set of rows but return them one at a time.</p>
<p>Cursor should be used because the host language can deal with only one row at a time.</p>
<p><strong><span> </span>How would you retrieve rows from a DB2 table in embedded SQL? </strong></p>
<p>Either by using the single row SELECT statements, or by using the CURSOR.</p>
<p>Apart from cursor, what other ways are available to you to retrieve a row from a table in embedded SQL? &#8211; </p>
<p>Single row SELECTs.</p>
<p><strong><span> </span>Where would you specify the DECLARE CURSOR statement? </strong></p>
<p>See answer to next question.</p>
<p><strong>How do you specify and use a cursor in a COBOL program? </strong></p>
<p>Use DECLARE CURSOR statement either in working storage or in procedure division(before open cursor), to specify the SELECT statement. Then use OPEN, FETCH rows in a loop and finally CLOSE.<strong></strong></p>
<p><strong><span> </span>What happens when you say OPEN CURSOR? </strong></p>
<p>If there is an ORDER BY clause, rows are fetched, sorted and made available for the FETCH statement. Other wise simply the cursor is placed on the first row.</p>
<p><strong><span> </span>Is DECLARE CURSOR executable? </strong></p>
<p>No.</p>
<p><strong><span> </span>Can you have more than one cursor open at any one time in a program ? – </strong></p>
<p>Yes.</p>
<p><strong><span> </span>When you COMMIT, is the cursor closed? &#8211; drona questions</strong></p>
<p>Yes.</p>
<p><strong><span> </span>How do you leave the cursor open after issuing a COMMIT? ( for DB2 2.3 or above only ) </strong></p>
<p>Use WITH HOLD option in DECLARE CURSOR statement. But, it has not effect in psuedo-conversational CICS programs.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/interviewfaqs.wordpress.com/176/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/interviewfaqs.wordpress.com/176/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/interviewfaqs.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/interviewfaqs.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/interviewfaqs.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/interviewfaqs.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/interviewfaqs.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/interviewfaqs.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/interviewfaqs.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/interviewfaqs.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/interviewfaqs.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/interviewfaqs.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/interviewfaqs.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/interviewfaqs.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/interviewfaqs.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/interviewfaqs.wordpress.com/176/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=interviewfaqs.wordpress.com&amp;blog=1949925&amp;post=176&amp;subd=interviewfaqs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/269a6e3240df248cd40152679df67c7c?s=96&#38;d=identicon" medium="image">
			<media:title type="html">interviewfaqs</media:title>
		</media:content>
	</item>
		<item>
		<title>DB2 interview questions-4</title>
		<link>http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-4/</link>
		<comments>http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-4/#comments</comments>
		<pubDate>Mon, 19 Nov 2007 16:57:03 +0000</pubDate>
		<dc:creator>interviewfaqs</dc:creator>
				<category><![CDATA[DB2]]></category>

		<guid isPermaLink="false">http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-4/</guid>
		<description><![CDATA[ What is the meaning of underscore ( ‘_’ ) in the LIKE statement?  Match for any single character.  What do you accomplish by GROUP BY &#8230; HAVING clause? GROUP BY partitions the selected rows on the distinct values of the column on which you group by. HAVING selects GROUPs which match the criteria specified  Consider [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=interviewfaqs.wordpress.com&amp;blog=1949925&amp;post=175&amp;subd=interviewfaqs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong><span> </span>What is the meaning of underscore ( ‘_’ ) in the LIKE statement?<span>  </span></strong></p>
<p>Match for any single character.</p>
<p><strong><span> </span>What do you accomplish by GROUP BY &#8230; HAVING clause? </strong></p>
<p>GROUP BY partitions the selected rows on the distinct values of the column on which you group by.</p>
<p>HAVING selects GROUPs which match the criteria specified</p>
<p><strong><span> </span>Consider the employee table with column PROJECT nullable. How can you get a list of employees who are not assigned to any project? </strong></p>
<p>SELECT EMPNO FROM EMP WHERE PROJECT IS NULL;</p>
<p><strong>What is the result of this query if no rows are selected: </strong></p>
<p>SELECT SUM(SALARY)</p>
<p>FROM EMP</p>
<p>WHERE QUAL=‘MSC’;</p>
<p>NULL</p>
<p><strong><span> </span>Why SELECT * is not preferred in embedded SQL programs?</strong></p>
<p>For three reasons:</p>
<p>If the table structure is changed ( a field is added ), the program will have to be modified </p>
<p>Program might retrieve the columns which it might not use, leading on I/O over head. </p>
<p>The chance of an index only scan is lost.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/interviewfaqs.wordpress.com/175/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/interviewfaqs.wordpress.com/175/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/interviewfaqs.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/interviewfaqs.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/interviewfaqs.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/interviewfaqs.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/interviewfaqs.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/interviewfaqs.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/interviewfaqs.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/interviewfaqs.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/interviewfaqs.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/interviewfaqs.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/interviewfaqs.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/interviewfaqs.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/interviewfaqs.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/interviewfaqs.wordpress.com/175/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=interviewfaqs.wordpress.com&amp;blog=1949925&amp;post=175&amp;subd=interviewfaqs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/269a6e3240df248cd40152679df67c7c?s=96&#38;d=identicon" medium="image">
			<media:title type="html">interviewfaqs</media:title>
		</media:content>
	</item>
		<item>
		<title>DB2 interview questions-3</title>
		<link>http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-3/</link>
		<comments>http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-3/#comments</comments>
		<pubDate>Mon, 19 Nov 2007 16:56:21 +0000</pubDate>
		<dc:creator>interviewfaqs</dc:creator>
				<category><![CDATA[DB2]]></category>

		<guid isPermaLink="false">http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-3/</guid>
		<description><![CDATA[What is the use of VALUE function? 1. Avoid -ve SQLCODEs by handling nulls and zeroes in computations 2. Substitute a numeric value for any nulls used in computation What is UNION,UNION ALL? UNION : eliminates duplicates UNION ALL: retains duplicates Both these are used to combine the results of different SELECT statements. Suppose I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=interviewfaqs.wordpress.com&amp;blog=1949925&amp;post=174&amp;subd=interviewfaqs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>What is the use of VALUE function? </strong></p>
<p>1. Avoid -ve SQLCODEs by handling nulls and zeroes in computations</p>
<p>2. Substitute a numeric value for any nulls used in computation</p>
<p><strong>What is </strong><strong>UNION</strong><strong>,</strong><strong>UNION</strong><strong> ALL? </strong></p>
<p>UNION : eliminates duplicates</p>
<p>UNION ALL: retains duplicates</p>
<p>Both these are used to combine the results of different SELECT statements.</p>
<p>Suppose I have five SQL SELECT statements connected by UNION/UNION ALL, how many times should I specify UNION to eliminate the duplicate rows? <span> </span>Once.</p>
<p><strong><span> </span>What is the restriction on using </strong><strong>UNION</strong><strong> in embedded SQL? </strong></p>
<p>It has to be in a CURSOR.<strong></strong></p>
<p><strong><span> </span>In the WHERE clause what is BETWEEN and IN? – </strong></p>
<p>BETWEEN supplies a range of values while IN supplies a list of values.</p>
<p><strong><span> </span>Is BETWEEN inclusive of the range values specified? – </strong></p>
<p>Yes.</p>
<p><strong><span> </span>What is &#8216;LIKE&#8217; used for in WHERE clause? What are the wildcard characters? – </strong></p>
<p>LIKE is used for partial string matches. ‘%’ ( for a string of any character ) and ‘_’ (for any single character ) are the two wild card characters.</p>
<p><strong><span> </span>When do you use a LIKE statement? </strong></p>
<p>To do partial search e.g. to search employee by name, you need not specify the complete name; using LIKE, you can search for partial string matches.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/interviewfaqs.wordpress.com/174/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/interviewfaqs.wordpress.com/174/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/interviewfaqs.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/interviewfaqs.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/interviewfaqs.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/interviewfaqs.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/interviewfaqs.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/interviewfaqs.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/interviewfaqs.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/interviewfaqs.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/interviewfaqs.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/interviewfaqs.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/interviewfaqs.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/interviewfaqs.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/interviewfaqs.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/interviewfaqs.wordpress.com/174/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=interviewfaqs.wordpress.com&amp;blog=1949925&amp;post=174&amp;subd=interviewfaqs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/269a6e3240df248cd40152679df67c7c?s=96&#38;d=identicon" medium="image">
			<media:title type="html">interviewfaqs</media:title>
		</media:content>
	</item>
		<item>
		<title>DB2 interview questions-2</title>
		<link>http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-2/</link>
		<comments>http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-2/#comments</comments>
		<pubDate>Mon, 19 Nov 2007 16:50:30 +0000</pubDate>
		<dc:creator>interviewfaqs</dc:creator>
				<category><![CDATA[DB2]]></category>

		<guid isPermaLink="false">http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-2/</guid>
		<description><![CDATA[How do you retrieve the first 5 characters of FIRSTNAME column of DB2 table EMP ? SQL Query : SELECT SUBSTR(FIRSTNAME,1,5) FROM EMP;    What are aggregate functions? Bulit-in mathematical functions for use in SELECT clause.    Can you use MAX on a CHAR column? YES.    My SQL statement SELECT AVG(SALARY) FROM EMP yields [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=interviewfaqs.wordpress.com&amp;blog=1949925&amp;post=173&amp;subd=interviewfaqs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>How do you retrieve the first 5 characters of FIRSTNAME column of DB2 table EMP ? </strong></p>
<p>SQL Query : SELECT SUBSTR(FIRSTNAME,1,5) FROM EMP;</p>
<p class="MsoNormal"><strong> </strong></p>
<p><strong><span> </span>What are aggregate functions? </strong></p>
<p>Bulit-in mathematical functions for use in SELECT clause.</p>
<p class="MsoNormal"><strong> </strong></p>
<p><strong><span> </span>Can you use MAX on a CHAR column? </strong></p>
<p>YES.</p>
<p class="MsoNormal"><strong> </strong></p>
<p><strong><span> </span>My SQL statement SELECT AVG(SALARY) FROM EMP yields inaccurate results. Why? </strong></p>
<p>Because SALARY is not declared to have NULLs and the employees for whom the salary is not known are also counted.</p>
<p class="MsoNormal"><strong> </strong></p>
<p><strong><span> </span>How do you concatenate the FIRSTNAME and LASTNAME from EMP table to give a complete name? </strong></p>
<p>SELECT FIRSTNAME || ‘ ‘ || LASTNAME FROM EMP;</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/interviewfaqs.wordpress.com/173/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/interviewfaqs.wordpress.com/173/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/interviewfaqs.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/interviewfaqs.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/interviewfaqs.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/interviewfaqs.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/interviewfaqs.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/interviewfaqs.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/interviewfaqs.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/interviewfaqs.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/interviewfaqs.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/interviewfaqs.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/interviewfaqs.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/interviewfaqs.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/interviewfaqs.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/interviewfaqs.wordpress.com/173/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=interviewfaqs.wordpress.com&amp;blog=1949925&amp;post=173&amp;subd=interviewfaqs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/269a6e3240df248cd40152679df67c7c?s=96&#38;d=identicon" medium="image">
			<media:title type="html">interviewfaqs</media:title>
		</media:content>
	</item>
		<item>
		<title>DB2 interview questions-1</title>
		<link>http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-1/</link>
		<comments>http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-1/#comments</comments>
		<pubDate>Mon, 19 Nov 2007 16:49:40 +0000</pubDate>
		<dc:creator>interviewfaqs</dc:creator>
				<category><![CDATA[DB2]]></category>

		<guid isPermaLink="false">http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-1/</guid>
		<description><![CDATA[ How would you find out the total number of rows in a DB2 table? Use SELECT COUNT(*) &#8230; in db2 query  How do you eliminate duplicate values in DB2 SELECT ? Use SELECT DISTINCT &#8230; in db2 query  How do you select a row using indexes in DB2? Specify the indexed columns in the WHERE [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=interviewfaqs.wordpress.com&amp;blog=1949925&amp;post=172&amp;subd=interviewfaqs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong><span> </span>How would you find out the total number of rows in a DB2 table? </strong></p>
<p>Use SELECT COUNT(*) &#8230; in db2 query</p>
<p><strong><span> </span>How do you eliminate duplicate values in DB2 SELECT ? </strong></p>
<p>Use SELECT DISTINCT &#8230; in db2 query</p>
<p><strong><span> </span>How do you select a row using indexes in DB2? </strong></p>
<p>Specify the indexed columns in the WHERE clause of db2 query.</p>
<p><strong><span> </span>How do you find the maximum value in a column in db2? </strong></p>
<p>Use SELECT MAX(&#8230;) .. in db2 query</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/interviewfaqs.wordpress.com/172/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/interviewfaqs.wordpress.com/172/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/interviewfaqs.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/interviewfaqs.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/interviewfaqs.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/interviewfaqs.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/interviewfaqs.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/interviewfaqs.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/interviewfaqs.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/interviewfaqs.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/interviewfaqs.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/interviewfaqs.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/interviewfaqs.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/interviewfaqs.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/interviewfaqs.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/interviewfaqs.wordpress.com/172/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=interviewfaqs.wordpress.com&amp;blog=1949925&amp;post=172&amp;subd=interviewfaqs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://interviewfaqs.wordpress.com/2007/11/19/db2-interview-questions-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/269a6e3240df248cd40152679df67c7c?s=96&#38;d=identicon" medium="image">
			<media:title type="html">interviewfaqs</media:title>
		</media:content>
	</item>
	</channel>
</rss>
