<?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; php and mysql questions</title>
	<atom:link href="http://www.pacecode.com/blog/tag/php-and-mysql-questions/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pacecode.com/blog</link>
	<description>Tips, Scripts and More...</description>
	<lastBuildDate>Sat, 03 Dec 2011 09:45:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<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>admin</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 [...]]]></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 - MySql is Open source, which can be available any time</span></p>
<p><span style="color: #333399;">2 - MySql has no cost of development purpose.</span></p>
<p><span style="color: #333399;">3 - MySql has most of features , which oracle provides</span></p>
<p><span style="color: #333399;">4 - MySql day by day updating with new facilities.</span></p>
<p><span style="color: #333399;">5 - Good for small application.</span></p>
<p><span style="color: #333399;">6 - easy to learn and to become master.</span></p>
<p><span style="color: #333399;">7 - 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>
]]></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>

