<?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>Pacecode Blog &#187; mysql tips and answers</title>
	<atom:link href="http://www.pacecode.com/blog/tag/mysql-tips-and-answers/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pacecode.com/blog</link>
	<description>Tips,Ideas, Free scripts and more...</description>
	<lastBuildDate>Sat, 24 Apr 2010 16:39:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Important MySQL Questions and Answers</title>
		<link>http://www.pacecode.com/blog/2008/12/25/important-mysql-questions-and-answers/</link>
		<comments>http://www.pacecode.com/blog/2008/12/25/important-mysql-questions-and-answers/#comments</comments>
		<pubDate>Thu, 25 Dec 2008 14:56:18 +0000</pubDate>
		<dc:creator>Raja MM</dc:creator>
				<category><![CDATA[interview questions]]></category>
		<category><![CDATA[mysql questions]]></category>
		<category><![CDATA[php questions]]></category>
		<category><![CDATA[important mysql questions with answers]]></category>
		<category><![CDATA[interviews question in mysql]]></category>
		<category><![CDATA[join queries in mysql]]></category>
		<category><![CDATA[mysql interview questions]]></category>
		<category><![CDATA[mysql questions and answers]]></category>
		<category><![CDATA[mysql tips and answers]]></category>
		<category><![CDATA[php and mysql questions]]></category>
		<category><![CDATA[subqueries in mysql]]></category>

		<guid isPermaLink="false">http://www.pacecode.com/blog/?p=94</guid>
		<description><![CDATA[How many types of join are supported by mysql? Which are they? Explain:
ans: there are three types of joins supported in mysql as inner, right and left.
The inner join displays all the rows from both tables where match is found.
Left join returns all the rows from first table even if the match is not found [...]]]></description>
			<content:encoded><![CDATA[<p><strong>How many types of join are supported by mysql? Which are they? Explain:</strong></p>
<p><strong>ans: </strong><span style="color: #333399;">there are three types of joins supported in mysql as inner, right and left.<br />
The inner join displays all the rows from both tables where match is found.<br />
Left join returns all the rows from first table even if the match is not found in second table.<br />
While the right join returns all the rows from second table even if match is not found in first table.</span></p>
<p><strong>What are the advantages of mysql comparing with oracle?</strong></p>
<p><span style="color: #333399;">MySql has many advantages in comparison to Oracle.</span></p>
<p><span style="color: #333399;">1 &#8211; MySql is Open source, which can be available any time</span></p>
<p><span style="color: #333399;">2 &#8211; MySql has no cost of development purpose.</span></p>
<p><span style="color: #333399;">3 &#8211; MySql has most of features , which oracle provides</span></p>
<p><span style="color: #333399;">4 &#8211; MySql day by day updating with new facilities.</span></p>
<p><span style="color: #333399;">5 &#8211; Good for small application.</span></p>
<p><span style="color: #333399;">6 &#8211; easy to learn and to become master.</span></p>
<p><span style="color: #333399;">7 &#8211; MySql has a good power these days.</span></p>
<p><span style="color: #333399;">even though MySql having so many advantages, Oracle is best database ever in Software development.</span></p>
<p><strong>What are the limitations of <a href="#">mysql</a> in Comparison of <a href="#">Oracle</a>?</strong></p>
<ul class="unIndentedList">
<li> <span style="color: #333399;">Mysql supports six different types of tables, four of which do not support transactions (MyISAM, MERGE, ISAM, and HEAP)</span></li>
<li><span style="color: #333399;"> MySQL only supports one index type</span></li>
<li><span style="color: #333399;"> Unlike Oracle, MySQL date data types can store invalid dates, do not support time zones, and the precision of time values is limited to one second.</span></li>
</ul>
<p><strong>How many drivers in <a href="javascript:void(0)">MYSQL</a>?</strong></p>
<p><span style="color: #333399;">There are eleven drivers in MYSQL .Six of them from MySQL AB and five by MYSQL Communities. They are1.PHP Driver2.ODBC Driver3.JDBC Driver4.ado.net5.mxj6.CAPI1PHP DRIVER2.PERL DRIVER3.PYTHON DRIVER4.RUBY DRIVER5.C++ WRAPPER</span></p>
<p><strong>How are triggers created in MySQL?</strong></p>
<p><span style="color: #333399;">CREATE TRIGGER `tgr_name` AFTER UPDATE ON `addresses` FOR EACH ROW begin</span></p>
<p><span style="color: #333399;">update products set countryName = new.countryName where products.shippingAddressId = old.id;</span></p>
<p><span style="color: #333399;">end;</span><span id="more-94"></span></p>
<p><strong>Use of triggers in MySQL:</strong></p>
<p><span style="color: #333399;">Triggers are programmable events that react to queries and reside directly on the database server. Triggers can be executed before or after INSERT, UPDATE or DELETE statements.</span></p>
<p><span style="color: #333399;"><strong>Ref:</strong> <a href="http://www.digitalpropulsion.org/Programming/Triggers_in_MySQL_5_0">http://www.digitalpropulsion.org/Programming/Triggers_in_MySQL_5_0</a></span></p>
<p><span style="color: #000000;"><strong>What are the data types available in MySQL?</strong></span></p>
<p><span style="color: #333399;">DATA TYPES in mysql </span></p>
<p><span style="color: #333399;"><strong>varchar </strong>=&gt; A variable section from 0 to 255 characters long.</span></p>
<p><span style="color: #333399;"><strong>tinyint</strong> =&gt; A string with a maximum length of 255 characters.</span></p>
<p><span style="color: #333399;"><strong>text</strong> =&gt; A string with a maximum length of 65535 characters.</span></p>
<p><span style="color: #333399;"><strong>date</strong> =&gt; YYYY-MM-DD.</span></p>
<p><span style="color: #333399;"><strong>smallint</strong> <strong>mediumint</strong> <strong>int</strong> =&gt;      -2147483648 to 2147483647 normal 0 to 4294967295 UNSIGNED.</span></p>
<p><span style="color: #333399;"><strong>bigint</strong> =&gt;      -9223372036854775808 to 9223372036854775807 normal 0 to 18446744073709551615 UNSIGNED.</span></p>
<p><span style="color: #333399;"><strong>float</strong> =&gt; A small number with a floating decimal point.</span></p>
<p><span style="color: #333399;"><strong>double</strong> =&gt; A large number with a floating decimal point.</span></p>
<p><span style="color: #333399;"><strong>decimal</strong> =&gt; A DOUBLE stored as a string , allowing for a fixed decimal point.</span></p>
<p><span style="color: #333399;"><strong>datetime</strong> =&gt; YYYY-MM-DD HH:MM:SS. timestamp =&gt; YYYYMMDDHHMMSS.</span></p>
<p><span style="color: #333399;"><strong>time</strong> =&gt;       HH:MM:SS. year</span></p>
<p><span style="color: #333399;"><strong>char</strong> =&gt; CHAR( ) A fixed section from 0 to 255 characters long.</span></p>
<p><span style="color: #333399;"><strong>tinyblob tinytext</strong></span></p>
<p><span style="color: #333399;"><strong>blob</strong> =&gt; A string with a maximum length of 65535 characters.BLOB stands for Binary Large OBject.</span></p>
<p><span style="color: #333399;"><strong>mediumblob</strong> =&gt; A string with a maximum length of 16777215 characters.</span></p>
<p><span style="color: #333399;"><strong>longblob</strong> =&gt; A string with a maximum length of 4294967295 characters.</span></p>
<p><span style="color: #333399;"><strong>longtext</strong> <strong>enum</strong> =&gt; Short for ENUMERATION which means that each column may have one of a specified possible values.</span></p>
<p><span style="color: #333399;"><strong>set</strong> =&gt; Similar to ENUM except each column may have more than one of the specified possible values. bool binary varbinary</span></p>
<p><strong>How is sub queries handled in MySQL?</strong></p>
<p><span style="color: #333399;">Sub queries in MySQL handled nested way, You can see the example and understand yourself -</span></p>
<p><span style="color: #333399;">SELECT name, headofstate, population FROM Country WHERE population=(SELECT MAX(population) FROM Country);</span></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Share this post</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fwww.pacecode.com%2Fblog%2F2008%2F12%2F25%2Fimportant-mysql-questions-and-answers%2F&amp;submitHeadline=Important+MySQL+Questions+and+Answers&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.pacecode.com/blog/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.pacecode.com%2Fblog%2F2008%2F12%2F25%2Fimportant-mysql-questions-and-answers%2F&amp;title=Important+MySQL+Questions+and+Answers" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.pacecode.com/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.pacecode.com%2Fblog%2F2008%2F12%2F25%2Fimportant-mysql-questions-and-answers%2F&amp;title=Important+MySQL+Questions+and+Answers" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.pacecode.com/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.pacecode.com%2Fblog%2F2008%2F12%2F25%2Fimportant-mysql-questions-and-answers%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.pacecode.com/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.pacecode.com%2Fblog%2F2008%2F12%2F25%2Fimportant-mysql-questions-and-answers%2F&amp;title=Important+MySQL+Questions+and+Answers" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.pacecode.com/blog/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http%3A%2F%2Fwww.pacecode.com%2Fblog%2F2008%2F12%2F25%2Fimportant-mysql-questions-and-answers%2F&amp;bm_description=Important+MySQL+Questions+and+Answers" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://www.pacecode.com/blog/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http%3A%2F%2Fwww.pacecode.com%2Fblog%2F2008%2F12%2F25%2Fimportant-mysql-questions-and-answers%2F&amp;T=Important+MySQL+Questions+and+Answers" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.pacecode.com/blog/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.pacecode.com%2Fblog%2F2008%2F12%2F25%2Fimportant-mysql-questions-and-answers%2F&amp;title=Important+MySQL+Questions+and+Answers" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.pacecode.com/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.pacecode.com%2Fblog%2F2008%2F12%2F25%2Fimportant-mysql-questions-and-answers%2F&amp;title=Important+MySQL+Questions+and+Answers" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.pacecode.com/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.pacecode.com%2Fblog%2F2008%2F12%2F25%2Fimportant-mysql-questions-and-answers%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.pacecode.com/blog/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http%3A%2F%2Fwww.pacecode.com%2Fblog%2F2008%2F12%2F25%2Fimportant-mysql-questions-and-answers%2F" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://www.pacecode.com/blog/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Important+MySQL+Questions+and+Answers+@+http%3A%2F%2Fwww.pacecode.com%2Fblog%2F2008%2F12%2F25%2Fimportant-mysql-questions-and-answers%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.pacecode.com/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fwww.pacecode.com%2Fblog%2F2008%2F12%2F25%2Fimportant-mysql-questions-and-answers%2F&amp;t=Important+MySQL+Questions+and+Answers" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.pacecode.com/blog/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.pacecode.com/blog/2008/12/25/important-mysql-questions-and-answers/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
