<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4297531928834740029</id><updated>2012-02-16T05:42:19.059-08:00</updated><title type='text'>Database trivia</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default?start-index=101&amp;max-results=100'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>111</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-3111888821456498994</id><published>2009-08-31T00:44:00.000-07:00</published><updated>2009-08-31T00:45:31.672-07:00</updated><title type='text'>have you tried sugar CRM ?</title><content type='html'>&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/Ldtnnkpyeds&amp;hl=en&amp;fs=1&amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/Ldtnnkpyeds&amp;hl=en&amp;fs=1&amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-3111888821456498994?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/3111888821456498994/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=3111888821456498994' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/3111888821456498994'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/3111888821456498994'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/08/have-you-tried-sugar-crm.html' title='have you tried sugar CRM ?'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-5720325340624162127</id><published>2009-08-08T00:51:00.001-07:00</published><updated>2009-08-08T00:51:35.504-07:00</updated><title type='text'>content management in plain english</title><content type='html'>&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/fUTZLRX1njY&amp;hl=en&amp;fs=1&amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/fUTZLRX1njY&amp;hl=en&amp;fs=1&amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-5720325340624162127?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/5720325340624162127/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=5720325340624162127' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/5720325340624162127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/5720325340624162127'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/08/content-management-in-plain-english.html' title='content management in plain english'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-8107974757619324231</id><published>2009-08-05T00:28:00.001-07:00</published><updated>2009-08-05T00:28:51.501-07:00</updated><title type='text'>How to Empty or Truncate Your MySQL Database Table Tutorial</title><content type='html'>&lt;object width="560" height="340"&gt;&lt;param name="movie" value="http://www.youtube.com/v/JQ8bDL4AySc&amp;hl=en&amp;fs=1&amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/JQ8bDL4AySc&amp;hl=en&amp;fs=1&amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-8107974757619324231?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/8107974757619324231/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=8107974757619324231' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/8107974757619324231'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/8107974757619324231'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/08/how-to-empty-or-truncate-your-mysql.html' title='How to Empty or Truncate Your MySQL Database Table Tutorial'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-2325366033999230857</id><published>2009-07-14T22:40:00.001-07:00</published><updated>2009-07-14T22:41:40.080-07:00</updated><title type='text'>one-to-many relationship</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1sAdkVkcI/AAAAAAAABWo/tVB4JkksaGk/s1600-h/onetomany.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 163px;" src="http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1sAdkVkcI/AAAAAAAABWo/tVB4JkksaGk/s320/onetomany.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5358557886833594818" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-2325366033999230857?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/2325366033999230857/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=2325366033999230857' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/2325366033999230857'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/2325366033999230857'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/07/one-to-many-relationship.html' title='one-to-many relationship'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1sAdkVkcI/AAAAAAAABWo/tVB4JkksaGk/s72-c/onetomany.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-8760306523899054234</id><published>2009-07-14T21:24:00.001-07:00</published><updated>2009-07-14T21:24:56.268-07:00</updated><title type='text'>reserved sql keyword as column name</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_nF2AQDhdiZc/Sl1aAtHpWPI/AAAAAAAABWY/IaWZm-4UWmM/s1600-h/reserved-sql-keyword-as-column.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 309px; height: 320px;" src="http://3.bp.blogspot.com/_nF2AQDhdiZc/Sl1aAtHpWPI/AAAAAAAABWY/IaWZm-4UWmM/s320/reserved-sql-keyword-as-column.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5358538099798923506" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-8760306523899054234?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/8760306523899054234/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=8760306523899054234' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/8760306523899054234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/8760306523899054234'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/07/reserved-sql-keyword-as-column-name.html' title='reserved sql keyword as column name'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_nF2AQDhdiZc/Sl1aAtHpWPI/AAAAAAAABWY/IaWZm-4UWmM/s72-c/reserved-sql-keyword-as-column.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-1775263836370750862</id><published>2009-07-14T05:59:00.000-07:00</published><updated>2009-07-14T06:00:40.490-07:00</updated><title type='text'>Junction Table</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_nF2AQDhdiZc/SlyBWq425qI/AAAAAAAABUo/_SkPCed547o/s1600-h/junction-table.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 293px;" src="http://3.bp.blogspot.com/_nF2AQDhdiZc/SlyBWq425qI/AAAAAAAABUo/_SkPCed547o/s320/junction-table.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5358299883133920930" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-1775263836370750862?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/1775263836370750862/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=1775263836370750862' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/1775263836370750862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/1775263836370750862'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/07/junction-table.html' title='Junction Table'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_nF2AQDhdiZc/SlyBWq425qI/AAAAAAAABUo/_SkPCed547o/s72-c/junction-table.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-1836967058369250288</id><published>2009-07-09T03:21:00.000-07:00</published><updated>2009-07-09T05:07:59.129-07:00</updated><title type='text'>stored procedure examples in MySQl 5.0</title><content type='html'>a stored procedure is a set of pre compiled SQL routines physically stored on the database.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  create procedure proc_name([parameter[,...]])&lt;br /&gt;  [characteristic ...] routine_body&lt;br /&gt;&lt;br /&gt;  parameter:&lt;br /&gt;        [IN|OUT|INOUT] param_name type&lt;br /&gt;&lt;br /&gt;  type:&lt;br /&gt;       any valid mysql data type&lt;br /&gt;&lt;br /&gt;  characteristic:&lt;br /&gt;      LANGUAGE SQL&lt;br /&gt;             | [not] DETERMINISTIC&lt;br /&gt;             | SQL SECURITY {DEFINER | INVOKER}&lt;br /&gt;             | COMMENT 'string'&lt;br /&gt; &lt;br /&gt;  routine_body:&lt;br /&gt;          valid sql procedure statements&lt;br /&gt;-------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;  parameter types in stored procedures:-&lt;br /&gt;&lt;br /&gt;  IN: the default. this parameter is passed to the procedure and can be changed inside the procedure, but remains changed outside.&lt;br /&gt;&lt;br /&gt;  OUT: no value is supplied to the procedure(it is assumed to be null), but it can be modified inside the procedure and is available outside the procedure&lt;br /&gt;&lt;br /&gt;  INOUT: the characteristics of both IN and OUT parameters. A value can be passed to the procedure, modified there as well as passed back again.&lt;br /&gt;&lt;br /&gt;Ex:-&lt;br /&gt;&lt;br /&gt;mysql&gt; delimiter //&lt;br /&gt;mysql&gt; create procedure displaycustomer (OUT Param1 INT)&lt;br /&gt;    -&gt; begin&lt;br /&gt;    -&gt; select count(*) into Param1 from CustomerMaster;&lt;br /&gt;    -&gt; end&lt;br /&gt;    -&gt; //&lt;br /&gt;Query OK, 0 rows affected (0.01 sec)&lt;br /&gt;&lt;br /&gt;mysql&gt; call displaycustomer(@noofc);&lt;br /&gt;Query OK, 0 rows affected (0.05 sec)&lt;br /&gt;&lt;br /&gt;mysql&gt; select @noofc;&lt;br /&gt;+--------+&lt;br /&gt;| @noofc |&lt;br /&gt;+--------+&lt;br /&gt;| 12     | &lt;br /&gt;+--------+&lt;br /&gt;1 row in set (0.00 sec)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ex:-&lt;br /&gt;     mysql&gt; create procedure square(INOUT P INT) set p=p*p;&lt;br /&gt;     Query OK, 0 rows affected (0.00 sec)&lt;br /&gt;&lt;br /&gt;     mysql&gt; set @Number=10;&lt;br /&gt;Query OK, 0 rows affected (0.00 sec)&lt;br /&gt;&lt;br /&gt;mysql&gt; call square(@Number);&lt;br /&gt;Query OK, 0 rows affected (0.00 sec)&lt;br /&gt;&lt;br /&gt;mysql&gt; select @Number;&lt;br /&gt;+---------+&lt;br /&gt;| @Number |&lt;br /&gt;+---------+&lt;br /&gt;| 100     | &lt;br /&gt;+---------+&lt;br /&gt;1 row in set (0.00 sec)&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;mysql&gt; create procedure procupdate(trnid VARCHAR(6), maxamt INT)&lt;br /&gt;     begin&lt;br /&gt;     declare num INT;&lt;br /&gt;     start transaction;&lt;br /&gt;     update TransactionDetail&lt;br /&gt;     set productcost=productcost+productcost*0.5&lt;br /&gt;     where transactionid=trnid;&lt;br /&gt;     &lt;br /&gt;     update TransactionMaster&lt;br /&gt;     set amount=(select sum(productcost) from TransactionDetail where transactionid=trnid)&lt;br /&gt;     where transactionid=trnid;&lt;br /&gt;     &lt;br /&gt;     select amount into @num from TransactionMaster&lt;br /&gt;    where transactionid=trnid;&lt;br /&gt;     &lt;br /&gt;     IF @num &gt;maxamt then&lt;br /&gt;     rollback;&lt;br /&gt;     select 'transaction amount more than transaction limit';&lt;br /&gt;     select 'action performed rollback';&lt;br /&gt;     else&lt;br /&gt;      commit;&lt;br /&gt;      select 'transaction amount within maximum limit';&lt;br /&gt;       select 'action performed commit';&lt;br /&gt;     END IF;&lt;br /&gt;     &lt;br /&gt;    end&lt;br /&gt;    //&lt;br /&gt;Query OK, 0 rows affected (0.03 sec)&lt;br /&gt;------------------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;mysql&gt; create procedure procinssp()&lt;br /&gt;    -&gt; begin&lt;br /&gt;    -&gt; declare trnamt INT;&lt;br /&gt;    -&gt; START TRANSACTION;&lt;br /&gt;    -&gt; savepoint spins;&lt;br /&gt;    -&gt; insert into TransactionDetail values('TRN013','PRD004',10000);&lt;br /&gt;    -&gt; insert into TransactionDetail values('TRN013','PRD008',1000);&lt;br /&gt;    -&gt; select sum(productcost) into @trnamt from TransactionDetail&lt;br /&gt;    -&gt; where transactionid='TRN013';&lt;br /&gt;    -&gt; &lt;br /&gt;    -&gt; IF @trnamt &lt; 20000 THEN&lt;br /&gt;    -&gt;  ROLLBACK;&lt;br /&gt;    -&gt;  select 'sum of product cost &lt; 20000';&lt;br /&gt;    -&gt;  select 'action performed: Rollback ';&lt;br /&gt;    -&gt; END IF;&lt;br /&gt;    -&gt; &lt;br /&gt;    -&gt; IF @trnamt &gt; 30000 and @trnamt &lt; 60000 THEN&lt;br /&gt;    -&gt;  ROLLBACK TO savepoint spins;&lt;br /&gt;    -&gt;  select 'sum of product cost between 30000 AND 60000';&lt;br /&gt;    -&gt;  select 'action performed: Rollback to a save point ';&lt;br /&gt;    -&gt; END IF;&lt;br /&gt;    -&gt; &lt;br /&gt;    -&gt; end;&lt;br /&gt;    -&gt; //&lt;br /&gt;Query OK, 0 rows affected (0.00 sec)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How to drop a procedure ?&lt;br /&gt;&lt;br /&gt;drop procedure [IF EXISTS] &lt;procedure name&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-1836967058369250288?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/1836967058369250288/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=1836967058369250288' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/1836967058369250288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/1836967058369250288'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/07/stored-procedure-examples-in-mysql-50.html' title='stored procedure examples in MySQl 5.0'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-2322066286269984124</id><published>2009-07-05T12:38:00.001-07:00</published><updated>2009-07-05T12:39:21.776-07:00</updated><title type='text'>unique key syntax (mysql 5.0)</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_nF2AQDhdiZc/SlEBSaATGOI/AAAAAAAABTo/BsHyikkjoBY/s1600-h/uniquekey1.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 107px;" src="http://4.bp.blogspot.com/_nF2AQDhdiZc/SlEBSaATGOI/AAAAAAAABTo/BsHyikkjoBY/s320/uniquekey1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5355062847650076898" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-2322066286269984124?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/2322066286269984124/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=2322066286269984124' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/2322066286269984124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/2322066286269984124'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/07/unique-key-syntax.html' title='unique key syntax (mysql 5.0)'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_nF2AQDhdiZc/SlEBSaATGOI/AAAAAAAABTo/BsHyikkjoBY/s72-c/uniquekey1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-4139262261061001532</id><published>2009-07-05T02:55:00.000-07:00</published><updated>2009-07-05T02:56:16.778-07:00</updated><title type='text'>producing html o/p in mysql</title><content type='html'>zodiac@zodiac-desktop:~$ mysql --user=root --password=rootus  --html -e "select *from ProductMaster;" bayross&lt;br /&gt;&lt;br /&gt;NB:- --html options produce output only for queries that generate a result set. no o/p is written for queries associated with insert or update statements&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-4139262261061001532?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/4139262261061001532/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=4139262261061001532' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/4139262261061001532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/4139262261061001532'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/07/producing-html-op-in-mysql.html' title='producing html o/p in mysql'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-6681977527526218960</id><published>2009-07-05T02:52:00.001-07:00</published><updated>2009-07-05T02:53:52.184-07:00</updated><title type='text'>how to tell mysql to read queries from a file</title><content type='html'>System prompt&gt; mysql [-h host] [-u user username] [-p] &lt; (sql input file) [ &gt; output file]&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_nF2AQDhdiZc/SlB4HOYN5AI/AAAAAAAABTY/AaSgvuY2Qnk/s1600-h/filereading.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 7px;" src="http://4.bp.blogspot.com/_nF2AQDhdiZc/SlB4HOYN5AI/AAAAAAAABTY/AaSgvuY2Qnk/s320/filereading.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5354912022457607170" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-6681977527526218960?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/6681977527526218960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=6681977527526218960' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/6681977527526218960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/6681977527526218960'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/07/how-to-tell-mysql-to-read-queries-from.html' title='how to tell mysql to read queries from a file'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_nF2AQDhdiZc/SlB4HOYN5AI/AAAAAAAABTY/AaSgvuY2Qnk/s72-c/filereading.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-645519584767704080</id><published>2009-07-05T02:18:00.001-07:00</published><updated>2009-07-05T02:22:09.105-07:00</updated><title type='text'>short cuts for mysql command prompt</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_nF2AQDhdiZc/SlBwWPQ6fUI/AAAAAAAABTI/O-K11tfRJ7Q/s1600-h/shortcuts-mysql-cmd-prompt.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 228px;" src="http://1.bp.blogspot.com/_nF2AQDhdiZc/SlBwWPQ6fUI/AAAAAAAABTI/O-K11tfRJ7Q/s320/shortcuts-mysql-cmd-prompt.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5354903484300426562" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Tested on Server version: 5.0.51a-3ubuntu5.4 (Ubuntu)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-645519584767704080?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/645519584767704080/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=645519584767704080' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/645519584767704080'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/645519584767704080'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/07/short-cuts-for-mysql-command-prompt.html' title='short cuts for mysql command prompt'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_nF2AQDhdiZc/SlBwWPQ6fUI/AAAAAAAABTI/O-K11tfRJ7Q/s72-c/shortcuts-mysql-cmd-prompt.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-6493417573462554666</id><published>2009-07-04T21:47:00.000-07:00</published><updated>2009-07-14T22:45:46.753-07:00</updated><title type='text'>alter table command examples</title><content type='html'>alter table table name add ( &lt;new column name&gt; &lt;data type&gt; (size));&lt;br /&gt;&lt;br /&gt;adding new columns at a specific location:-&lt;br /&gt;&lt;br /&gt;alter table (table name) add (new column name) (data type) (size) after (old column name);&lt;br /&gt;&lt;br /&gt;adding a new column as the first column&lt;br /&gt;&lt;br /&gt; alter table (table name) add (new column name) (data type) (size) FIRST;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;dropping a column:-&lt;br /&gt;&lt;br /&gt;alter table (table name) drop column (column name)&lt;br /&gt;&lt;br /&gt;modifying existing columns:-&lt;br /&gt;&lt;br /&gt;alter table (table name) modify (column name) (new data type) (new size)[FIRST][AFTER (column name)] &lt;br /&gt;&lt;br /&gt;&lt;br /&gt; Renaming existing columns:-&lt;br /&gt;&lt;br /&gt;alter table (table name) change (old column name) (new column name) (data type) (size)[FIRST][AFTER (column name)]&lt;br /&gt;&lt;br /&gt;Renaming a table:-&lt;br /&gt;&lt;br /&gt;alter table (old table name) rename [TO] (new table name);&lt;br /&gt;&lt;br /&gt;change engine type of a table:-&lt;br /&gt;alter table (table name) type= (type);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;adding foreign key via alter table&lt;br /&gt;&lt;br /&gt; ex:-&lt;br /&gt;          alter table product add constraint fk_companyid&lt;br /&gt;          foreign key(cid) references cmaster(cid);&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_nF2AQDhdiZc/Sl1s75LIzQI/AAAAAAAABW4/EB39U5p2-Qs/s1600-h/altertable1.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 117px;" src="http://3.bp.blogspot.com/_nF2AQDhdiZc/Sl1s75LIzQI/AAAAAAAABW4/EB39U5p2-Qs/s320/altertable1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5358558907856375042" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_nF2AQDhdiZc/Sl1s0xNFm6I/AAAAAAAABWw/xVeSlsA25lY/s1600-h/altertable.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 209px;" src="http://4.bp.blogspot.com/_nF2AQDhdiZc/Sl1s0xNFm6I/AAAAAAAABWw/xVeSlsA25lY/s320/altertable.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5358558785457986466" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-6493417573462554666?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/6493417573462554666/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=6493417573462554666' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/6493417573462554666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/6493417573462554666'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/07/alter-table-command-examples.html' title='alter table command examples'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_nF2AQDhdiZc/Sl1s75LIzQI/AAAAAAAABW4/EB39U5p2-Qs/s72-c/altertable1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-2032562475602576846</id><published>2009-07-04T00:26:00.001-07:00</published><updated>2009-07-04T00:26:44.863-07:00</updated><title type='text'>accessing command line help in mysql ?</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_nF2AQDhdiZc/Sk8EKZLYkFI/AAAAAAAABSw/K14GZO6xe5E/s1600-h/helpmysql.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 276px;" src="http://3.bp.blogspot.com/_nF2AQDhdiZc/Sk8EKZLYkFI/AAAAAAAABSw/K14GZO6xe5E/s320/helpmysql.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5354503058570645586" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-2032562475602576846?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/2032562475602576846/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=2032562475602576846' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/2032562475602576846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/2032562475602576846'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/07/accessing-command-line-help-in-mysql.html' title='accessing command line help in mysql ?'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_nF2AQDhdiZc/Sk8EKZLYkFI/AAAAAAAABSw/K14GZO6xe5E/s72-c/helpmysql.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-3678187599439894269</id><published>2009-07-04T00:22:00.000-07:00</published><updated>2009-07-04T00:23:27.858-07:00</updated><title type='text'>deleting users from mysql</title><content type='html'>mysql&gt; drop user myuser;&lt;br /&gt;Query OK, 0 rows affected (0.00 sec)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-3678187599439894269?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/3678187599439894269/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=3678187599439894269' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/3678187599439894269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/3678187599439894269'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/07/deleting-users-from-mysql.html' title='deleting users from mysql'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-6176274494403257498</id><published>2009-07-04T00:16:00.001-07:00</published><updated>2009-07-04T00:16:33.650-07:00</updated><title type='text'>how to determine mysql version ?</title><content type='html'>mysql version:-&lt;br /&gt;&lt;br /&gt;zodiac@zodiac-desktop:~$ mysqladmin version;&lt;br /&gt;mysqladmin  Ver 8.41 Distrib 5.0.51a, for debian-linux-gnu on i486&lt;br /&gt;Copyright (C) 2000-2006 MySQL AB&lt;br /&gt;This software comes with ABSOLUTELY NO WARRANTY. This is free software,&lt;br /&gt;and you are welcome to modify and redistribute it under the GPL license&lt;br /&gt;&lt;br /&gt;Server version  5.0.51a-3ubuntu5.4&lt;br /&gt;Protocol version 10&lt;br /&gt;Connection  Localhost via UNIX socket&lt;br /&gt;UNIX socket  /var/run/mysqld/mysqld.sock&lt;br /&gt;Uptime:   8 min 44 sec&lt;br /&gt;&lt;br /&gt;Threads: 2  Questions: 59  Slow queries: 0  Opens: 40  Flush tables: 1  Open tables: 34  Queries per second avg: 0.113&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-6176274494403257498?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/6176274494403257498/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=6176274494403257498' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/6176274494403257498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/6176274494403257498'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/07/how-to-determine-mysql-version.html' title='how to determine mysql version ?'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-1582483716772308189</id><published>2009-07-04T00:09:00.000-07:00</published><updated>2009-07-04T00:11:21.138-07:00</updated><title type='text'>anonymous user in mysql</title><content type='html'>on linux based mysql installations anonymous user, having no password and no user name is provided by default.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_nF2AQDhdiZc/Sk8AcU24c_I/AAAAAAAABSo/EZQiQ0FB3Sw/s1600-h/anonymous.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 144px;" src="http://3.bp.blogspot.com/_nF2AQDhdiZc/Sk8AcU24c_I/AAAAAAAABSo/EZQiQ0FB3Sw/s320/anonymous.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5354498968602047474" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;this user will have access only to test database or any database beginning with the word test.&lt;br /&gt;&lt;br /&gt;tested on :- mysqladmin  Ver 8.41 Distrib 5.0.51a, for debian-linux-gnu on i486&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-1582483716772308189?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/1582483716772308189/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=1582483716772308189' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/1582483716772308189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/1582483716772308189'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/07/anonymous-user-in-mysql.html' title='anonymous user in mysql'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_nF2AQDhdiZc/Sk8AcU24c_I/AAAAAAAABSo/EZQiQ0FB3Sw/s72-c/anonymous.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-2953118690167414368</id><published>2009-07-03T20:05:00.001-07:00</published><updated>2009-07-03T20:06:27.654-07:00</updated><title type='text'>right outer join</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_nF2AQDhdiZc/Sk7HIU8vL9I/AAAAAAAABSg/H9Q1FUVwEWw/s1600-h/right-outer-join1.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 317px;" src="http://1.bp.blogspot.com/_nF2AQDhdiZc/Sk7HIU8vL9I/AAAAAAAABSg/H9Q1FUVwEWw/s320/right-outer-join1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5354435952866439122" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-2953118690167414368?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/2953118690167414368/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=2953118690167414368' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/2953118690167414368'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/2953118690167414368'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/07/right-outer-join.html' title='right outer join'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_nF2AQDhdiZc/Sk7HIU8vL9I/AAAAAAAABSg/H9Q1FUVwEWw/s72-c/right-outer-join1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-670276577641417647</id><published>2009-07-03T19:58:00.001-07:00</published><updated>2009-07-03T19:59:47.820-07:00</updated><title type='text'>transaction &amp; ACID test</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_nF2AQDhdiZc/Sk7FmOIMzfI/AAAAAAAABSQ/g3EZ1aEMUJU/s1600-h/acid1.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 199px;" src="http://1.bp.blogspot.com/_nF2AQDhdiZc/Sk7FmOIMzfI/AAAAAAAABSQ/g3EZ1aEMUJU/s320/acid1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5354434267408289266" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_nF2AQDhdiZc/Sk7FhLSIbXI/AAAAAAAABSI/JSwgllJKIbE/s1600-h/acid2.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 233px;" src="http://1.bp.blogspot.com/_nF2AQDhdiZc/Sk7FhLSIbXI/AAAAAAAABSI/JSwgllJKIbE/s320/acid2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5354434180745293170" /&gt;&lt;/a&gt;&lt;br /&gt;what do yo mean by transaction ?&lt;br /&gt;&lt;br /&gt;a transaction is a set of sql statements that accomplish a single unit of work.&lt;br /&gt;&lt;br /&gt;to help you decide what steps in your sql can be considered as a transaction use the ACID test.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-670276577641417647?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/670276577641417647/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=670276577641417647' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/670276577641417647'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/670276577641417647'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/07/transaction-acid-test.html' title='transaction &amp; ACID test'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_nF2AQDhdiZc/Sk7FmOIMzfI/AAAAAAAABSQ/g3EZ1aEMUJU/s72-c/acid1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-6632198132875610133</id><published>2009-07-01T21:00:00.001-07:00</published><updated>2009-07-01T21:00:55.834-07:00</updated><title type='text'>Rules of atomic data</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_nF2AQDhdiZc/Skww7kCDCYI/AAAAAAAABSA/kuXrMxGaZDg/s1600-h/rules_of_atomic_data.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 304px; height: 320px;" src="http://4.bp.blogspot.com/_nF2AQDhdiZc/Skww7kCDCYI/AAAAAAAABSA/kuXrMxGaZDg/s320/rules_of_atomic_data.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5353707856879356290" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-6632198132875610133?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/6632198132875610133/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=6632198132875610133' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/6632198132875610133'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/6632198132875610133'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/07/rules-of-atomic-data.html' title='Rules of atomic data'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_nF2AQDhdiZc/Skww7kCDCYI/AAAAAAAABSA/kuXrMxGaZDg/s72-c/rules_of_atomic_data.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-2076643228768820130</id><published>2009-07-01T20:59:00.001-07:00</published><updated>2009-07-01T20:59:55.693-07:00</updated><title type='text'>1st normal form</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_nF2AQDhdiZc/SkwwscOYmeI/AAAAAAAABR4/L2_FOCS_33c/s1600-h/1nf.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 229px;" src="http://4.bp.blogspot.com/_nF2AQDhdiZc/SkwwscOYmeI/AAAAAAAABR4/L2_FOCS_33c/s320/1nf.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5353707597085579746" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-2076643228768820130?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/2076643228768820130/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=2076643228768820130' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/2076643228768820130'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/2076643228768820130'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/07/1st-normal-form.html' title='1st normal form'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_nF2AQDhdiZc/SkwwscOYmeI/AAAAAAAABR4/L2_FOCS_33c/s72-c/1nf.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-2989003085775056173</id><published>2009-07-01T20:57:00.000-07:00</published><updated>2009-07-01T20:58:33.793-07:00</updated><title type='text'>functional dependency</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_nF2AQDhdiZc/SkwwYas7jtI/AAAAAAAABRw/vanWWcF7CeU/s1600-h/funcdep.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 215px;" src="http://3.bp.blogspot.com/_nF2AQDhdiZc/SkwwYas7jtI/AAAAAAAABRw/vanWWcF7CeU/s320/funcdep.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5353707253079445202" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-2989003085775056173?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/2989003085775056173/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=2989003085775056173' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/2989003085775056173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/2989003085775056173'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/07/functional-dependency.html' title='functional dependency'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_nF2AQDhdiZc/SkwwYas7jtI/AAAAAAAABRw/vanWWcF7CeU/s72-c/funcdep.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-2240399270128823863</id><published>2009-07-01T20:52:00.000-07:00</published><updated>2009-07-01T20:53:22.818-07:00</updated><title type='text'>partial functional dependency</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_nF2AQDhdiZc/SkwvKQSfN4I/AAAAAAAABRo/nFNA1gKphek/s1600-h/partialfd.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 246px;" src="http://3.bp.blogspot.com/_nF2AQDhdiZc/SkwvKQSfN4I/AAAAAAAABRo/nFNA1gKphek/s320/partialfd.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5353705910254385026" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-2240399270128823863?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/2240399270128823863/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=2240399270128823863' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/2240399270128823863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/2240399270128823863'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/07/partial-functional-dependency.html' title='partial functional dependency'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_nF2AQDhdiZc/SkwvKQSfN4I/AAAAAAAABRo/nFNA1gKphek/s72-c/partialfd.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-1903046469676254790</id><published>2009-07-01T20:44:00.000-07:00</published><updated>2009-07-01T20:50:32.733-07:00</updated><title type='text'>second normal form</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Rule 1: Be in 1NF&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Rule 2: Have no Partial functional dependencies&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;The second normal form focuses on how the primary key in a table relates to the data in it &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;your 1NF table is also in 2NF if all the columns in the table are the part of the primary key&lt;br /&gt;or it has a single column primary key&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-1903046469676254790?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/1903046469676254790/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=1903046469676254790' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/1903046469676254790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/1903046469676254790'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/07/second-normal-form.html' title='second normal form'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-2242349845355674436</id><published>2009-07-01T20:41:00.000-07:00</published><updated>2009-07-01T20:42:25.011-07:00</updated><title type='text'>transistive dependency</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_nF2AQDhdiZc/Skwsl-MQIyI/AAAAAAAABRg/OW9NGz91aqA/s1600-h/transdep.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 299px; height: 320px;" src="http://2.bp.blogspot.com/_nF2AQDhdiZc/Skwsl-MQIyI/AAAAAAAABRg/OW9NGz91aqA/s320/transdep.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5353703087897846562" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-2242349845355674436?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/2242349845355674436/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=2242349845355674436' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/2242349845355674436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/2242349845355674436'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/07/transistive-dependency.html' title='transistive dependency'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_nF2AQDhdiZc/Skwsl-MQIyI/AAAAAAAABRg/OW9NGz91aqA/s72-c/transdep.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-3823703015244615385</id><published>2009-07-01T20:26:00.000-07:00</published><updated>2009-07-01T20:29:16.806-07:00</updated><title type='text'>PRIMARY KEY</title><content type='html'>&lt;span style="font-weight:bold;"&gt;A Primary key can't be NULL&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;The primary key must be compact&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;the primary key must contain only the information it needs to be unique and nothing extra&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;the primary key values can't be changed&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-3823703015244615385?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/3823703015244615385/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=3823703015244615385' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/3823703015244615385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/3823703015244615385'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/07/primary-key.html' title='PRIMARY KEY'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-4267636371558356130</id><published>2009-07-01T20:23:00.001-07:00</published><updated>2009-07-05T12:42:23.309-07:00</updated><title type='text'>foreign key</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_nF2AQDhdiZc/SlEA0NDJb8I/AAAAAAAABTg/fCCioHC_3XI/s1600-h/foreignkey.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 46px;" src="http://1.bp.blogspot.com/_nF2AQDhdiZc/SlEA0NDJb8I/AAAAAAAABTg/fCCioHC_3XI/s320/foreignkey.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5355062328776290242" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_nF2AQDhdiZc/SkwoUoXuMPI/AAAAAAAABRY/uiU90MfHC70/s1600-h/foreign-key.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 305px; height: 308px;" src="http://3.bp.blogspot.com/_nF2AQDhdiZc/SkwoUoXuMPI/AAAAAAAABRY/uiU90MfHC70/s320/foreign-key.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5353698391936086258" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_nF2AQDhdiZc/SkwoMOlzXpI/AAAAAAAABRQ/k46rkfnm_uY/s1600-h/self-referencing-foreign-key.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 227px;" src="http://2.bp.blogspot.com/_nF2AQDhdiZc/SkwoMOlzXpI/AAAAAAAABRQ/k46rkfnm_uY/s320/self-referencing-foreign-key.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5353698247576870546" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Mysql displays an error message when an attempt is made to delete a record in a master table when corresponding records exist in a detail table and prevents detail operation from succeeding.&lt;br /&gt;&lt;br /&gt;an insert or update of a value in a record in the detail table is rejected, if a corresponding value does not exist in the master table&lt;br /&gt;&lt;br /&gt;a delete operation from the master table is rejected if the corresponding records in the detail table exists&lt;br /&gt;&lt;br /&gt;must reference a primary key or unique key columns in a primary table&lt;br /&gt;&lt;br /&gt;requires that the foreign key columns and primary key columns have matching data types.&lt;br /&gt;&lt;br /&gt;******* can reference a column of the same table.&lt;br /&gt;&lt;br /&gt;ON DELETE CASCADE option&lt;br /&gt;&lt;br /&gt;when on delete cascade option is specified at foreign key creation time and if a record is deleted in the master table, all corresponding records in the detail table are deleted immediately as well.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;NB:- &lt;br /&gt;      both the tables must be of innodb type.&lt;br /&gt;      &lt;br /&gt;Innodb does not automatically create indexes on foreign keys or referenced keys so explicit index creation is required. indexes are needed so that foreign key checks can be fast and do not require a full table scan.&lt;br /&gt;&lt;br /&gt;corresponding columns in the primary key/ foreign key relationship must have similar data types so that column values can be compared without a type conversion.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;NB:- if the table holds a NULL value, Mysql ignores any UNIQUE or FOREIGN KEY constraints that may be attached to the column.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-4267636371558356130?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/4267636371558356130/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=4267636371558356130' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/4267636371558356130'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/4267636371558356130'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/07/foreign-key.html' title='foreign key'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_nF2AQDhdiZc/SlEA0NDJb8I/AAAAAAAABTg/fCCioHC_3XI/s72-c/foreignkey.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-6187426335116886545</id><published>2009-07-01T20:12:00.001-07:00</published><updated>2009-07-01T20:12:51.196-07:00</updated><title type='text'>schema</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_nF2AQDhdiZc/Skwlp8dUrxI/AAAAAAAABRI/exxLomsBxp4/s1600-h/schema.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 245px;" src="http://2.bp.blogspot.com/_nF2AQDhdiZc/Skwlp8dUrxI/AAAAAAAABRI/exxLomsBxp4/s320/schema.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5353695459570659090" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-6187426335116886545?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/6187426335116886545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=6187426335116886545' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/6187426335116886545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/6187426335116886545'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/07/schema.html' title='schema'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_nF2AQDhdiZc/Skwlp8dUrxI/AAAAAAAABRI/exxLomsBxp4/s72-c/schema.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-1607707001799510734</id><published>2009-07-01T20:01:00.001-07:00</published><updated>2009-07-01T20:02:30.916-07:00</updated><title type='text'>natural join</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_nF2AQDhdiZc/SkwjCdFdLXI/AAAAAAAABQ4/F9HcM7L1D8M/s1600-h/natural-join1.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 130px;" src="http://1.bp.blogspot.com/_nF2AQDhdiZc/SkwjCdFdLXI/AAAAAAAABQ4/F9HcM7L1D8M/s320/natural-join1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5353692582110899570" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_nF2AQDhdiZc/SkwjJDkjTvI/AAAAAAAABRA/57_GmGbKBIQ/s1600-h/naturaljoin.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 205px;" src="http://2.bp.blogspot.com/_nF2AQDhdiZc/SkwjJDkjTvI/AAAAAAAABRA/57_GmGbKBIQ/s320/naturaljoin.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5353692695521087218" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-1607707001799510734?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/1607707001799510734/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=1607707001799510734' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/1607707001799510734'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/1607707001799510734'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/07/natural-join.html' title='natural join'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_nF2AQDhdiZc/SkwjCdFdLXI/AAAAAAAABQ4/F9HcM7L1D8M/s72-c/natural-join1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-7683535125905382942</id><published>2009-07-01T19:52:00.001-07:00</published><updated>2009-07-01T19:56:49.957-07:00</updated><title type='text'>non-equijoin</title><content type='html'>the non-equijoin returns any rows that are not equal. consider the two tables boys and toys, by using non-equijoin , we can see exactly which toys each boy doesn't have&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_nF2AQDhdiZc/SkwhG7CYfII/AAAAAAAABQw/CzvE90-_f3U/s1600-h/nonequijoin.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 170px;" src="http://2.bp.blogspot.com/_nF2AQDhdiZc/SkwhG7CYfII/AAAAAAAABQw/CzvE90-_f3U/s320/nonequijoin.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5353690459847294082" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_nF2AQDhdiZc/SkwhBHpoSKI/AAAAAAAABQo/qo2eu0P2igY/s1600-h/nonequijoin1.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 242px; height: 320px;" src="http://3.bp.blogspot.com/_nF2AQDhdiZc/SkwhBHpoSKI/AAAAAAAABQo/qo2eu0P2igY/s320/nonequijoin1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5353690360153917602" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;non equi-join tests for inequality&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-7683535125905382942?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/7683535125905382942/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=7683535125905382942' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/7683535125905382942'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/7683535125905382942'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/07/non-equijoin.html' title='non-equijoin'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_nF2AQDhdiZc/SkwhG7CYfII/AAAAAAAABQw/CzvE90-_f3U/s72-c/nonequijoin.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-6635411795925718693</id><published>2009-07-01T19:47:00.001-07:00</published><updated>2009-07-05T02:51:25.188-07:00</updated><title type='text'>self join</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_nF2AQDhdiZc/Skwf5roiOAI/AAAAAAAABQg/NxjBlctRs48/s1600-h/selfjoin.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 158px;" src="http://3.bp.blogspot.com/_nF2AQDhdiZc/Skwf5roiOAI/AAAAAAAABQg/NxjBlctRs48/s320/selfjoin.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5353689132862420994" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_nF2AQDhdiZc/Skwf0SQyV-I/AAAAAAAABQY/7CLIsmrZ638/s1600-h/selfjoin1.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 173px;" src="http://2.bp.blogspot.com/_nF2AQDhdiZc/Skwf0SQyV-I/AAAAAAAABQY/7CLIsmrZ638/s320/selfjoin1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5353689040152582114" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_nF2AQDhdiZc/SlB3hYu9oPI/AAAAAAAABTQ/BFg7hhggCvw/s1600-h/selfjoin.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 198px;" src="http://1.bp.blogspot.com/_nF2AQDhdiZc/SlB3hYu9oPI/AAAAAAAABTQ/BFg7hhggCvw/s320/selfjoin.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5354911372402335986" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-6635411795925718693?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/6635411795925718693/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=6635411795925718693' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/6635411795925718693'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/6635411795925718693'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/07/self-join.html' title='self join'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_nF2AQDhdiZc/Skwf5roiOAI/AAAAAAAABQg/NxjBlctRs48/s72-c/selfjoin.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-5039223765953657273</id><published>2009-07-01T04:47:00.001-07:00</published><updated>2009-07-01T04:50:05.297-07:00</updated><title type='text'>change-modify-rename examples</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_nF2AQDhdiZc/SktNWlrS0UI/AAAAAAAABQQ/MOpzm8QWyjg/s1600-h/change-modify-rename.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 94px;" src="http://2.bp.blogspot.com/_nF2AQDhdiZc/SktNWlrS0UI/AAAAAAAABQQ/MOpzm8QWyjg/s320/change-modify-rename.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5353457632526127426" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_nF2AQDhdiZc/SktNDm9MMhI/AAAAAAAABQI/dExHT7ESYsA/s1600-h/chmod1.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 140px;" src="http://4.bp.blogspot.com/_nF2AQDhdiZc/SktNDm9MMhI/AAAAAAAABQI/dExHT7ESYsA/s320/chmod1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5353457306452111890" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_nF2AQDhdiZc/SktM9AyKHDI/AAAAAAAABQA/iIGNgy85vU4/s1600-h/change-modify.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 272px;" src="http://4.bp.blogspot.com/_nF2AQDhdiZc/SktM9AyKHDI/AAAAAAAABQA/iIGNgy85vU4/s320/change-modify.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5353457193126075442" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-5039223765953657273?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/5039223765953657273/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=5039223765953657273' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/5039223765953657273'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/5039223765953657273'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/07/change-modify-rename-examples.html' title='change-modify-rename examples'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_nF2AQDhdiZc/SktNWlrS0UI/AAAAAAAABQQ/MOpzm8QWyjg/s72-c/change-modify-rename.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-1683810295728979359</id><published>2009-07-01T04:26:00.000-07:00</published><updated>2009-07-01T04:34:19.729-07:00</updated><title type='text'>show command examples:-</title><content type='html'>&lt;span style="font-weight:bold;"&gt;to display individual columns in your table&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;show columns from table name;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;show create database database name;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;to get the command that will exactly re-create your database;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;show index from table name;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;this command will display any columns that are indexed and what type of index they have&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style="font-weight:bold;"&gt;show warnings&lt;/span&gt;&lt;br /&gt; to see all the warning messages&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;NB:- tested on mysql Server version: 5.0.51a-3ubuntu5.4 (Ubuntu)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-1683810295728979359?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/1683810295728979359/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=1683810295728979359' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/1683810295728979359'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/1683810295728979359'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/07/show-command-examples.html' title='show command examples:-'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-5202536691681673367</id><published>2009-07-01T04:19:00.000-07:00</published><updated>2009-07-01T04:22:47.786-07:00</updated><title type='text'>update query</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_nF2AQDhdiZc/SktGsPbkXHI/AAAAAAAABP4/32-0lu2AP5E/s1600-h/updatequery.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 310px; height: 311px;" src="http://2.bp.blogspot.com/_nF2AQDhdiZc/SktGsPbkXHI/AAAAAAAABP4/32-0lu2AP5E/s320/updatequery.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5353450307930315890" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_nF2AQDhdiZc/SktGmPqdSVI/AAAAAAAABPw/nJ2wSoSLkvw/s1600-h/updatecaseex.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 118px;" src="http://3.bp.blogspot.com/_nF2AQDhdiZc/SktGmPqdSVI/AAAAAAAABPw/nJ2wSoSLkvw/s320/updatecaseex.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5353450204913551698" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;tested on mysql Server version: 5.0.51a&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-5202536691681673367?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/5202536691681673367/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=5202536691681673367' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/5202536691681673367'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/5202536691681673367'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/07/update-query.html' title='update query'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_nF2AQDhdiZc/SktGsPbkXHI/AAAAAAAABP4/32-0lu2AP5E/s72-c/updatequery.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-8212703290452205023</id><published>2009-04-24T02:41:00.000-07:00</published><updated>2009-04-24T02:46:06.697-07:00</updated><title type='text'>10 mysql variables that you should monitor</title><content type='html'>These variables are accessible via SHOW STATUS; command&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_nF2AQDhdiZc/SfGJwmB2fsI/AAAAAAAABCU/B1PTiIOMCVc/s1600-h/snapshot41.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 138px;" src="http://4.bp.blogspot.com/_nF2AQDhdiZc/SfGJwmB2fsI/AAAAAAAABCU/B1PTiIOMCVc/s320/snapshot41.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5328191302091046594" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_nF2AQDhdiZc/SfGJrZFGusI/AAAAAAAABCM/HbJo_zHcLAo/s1600-h/snapshot42.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 210px;" src="http://3.bp.blogspot.com/_nF2AQDhdiZc/SfGJrZFGusI/AAAAAAAABCM/HbJo_zHcLAo/s320/snapshot42.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5328191212715686594" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_nF2AQDhdiZc/SfGJmMkQvzI/AAAAAAAABCE/U2uytgwT1xw/s1600-h/snapshot43.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 130px;" src="http://4.bp.blogspot.com/_nF2AQDhdiZc/SfGJmMkQvzI/AAAAAAAABCE/U2uytgwT1xw/s320/snapshot43.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5328191123457359666" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;source:- techrepublic&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-8212703290452205023?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/8212703290452205023/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=8212703290452205023' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/8212703290452205023'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/8212703290452205023'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/10-mysql-variables-that-you-should.html' title='10 mysql variables that you should monitor'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_nF2AQDhdiZc/SfGJwmB2fsI/AAAAAAAABCU/B1PTiIOMCVc/s72-c/snapshot41.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-3204966918004849796</id><published>2009-04-11T06:46:00.001-07:00</published><updated>2009-04-11T06:47:18.678-07:00</updated><title type='text'>Relationships</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_nF2AQDhdiZc/SeCfV9o4CpI/AAAAAAAABB0/p7aZtgoKxy4/s1600-h/relationship1.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 271px; height: 197px;" src="http://2.bp.blogspot.com/_nF2AQDhdiZc/SeCfV9o4CpI/AAAAAAAABB0/p7aZtgoKxy4/s320/relationship1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5323429959224003218" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_nF2AQDhdiZc/SeCfQY97w-I/AAAAAAAABBs/0L8ZVnXDxv4/s1600-h/relationship2.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 267px; height: 197px;" src="http://3.bp.blogspot.com/_nF2AQDhdiZc/SeCfQY97w-I/AAAAAAAABBs/0L8ZVnXDxv4/s320/relationship2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5323429863480869858" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-3204966918004849796?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/3204966918004849796/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=3204966918004849796' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/3204966918004849796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/3204966918004849796'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/relationships.html' title='Relationships'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_nF2AQDhdiZc/SeCfV9o4CpI/AAAAAAAABB0/p7aZtgoKxy4/s72-c/relationship1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-6630505699943804955</id><published>2009-04-11T06:43:00.000-07:00</published><updated>2009-04-11T06:44:59.504-07:00</updated><title type='text'>key attributes</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_nF2AQDhdiZc/SeCez6LlohI/AAAAAAAABBk/lTa2c-wf8Do/s1600-h/keyattr1.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 258px; height: 181px;" src="http://3.bp.blogspot.com/_nF2AQDhdiZc/SeCez6LlohI/AAAAAAAABBk/lTa2c-wf8Do/s320/keyattr1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5323429374180303378" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_nF2AQDhdiZc/SeCets5NR_I/AAAAAAAABBc/LIOvM-uk5D4/s1600-h/keyattr2.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 261px; height: 167px;" src="http://2.bp.blogspot.com/_nF2AQDhdiZc/SeCets5NR_I/AAAAAAAABBc/LIOvM-uk5D4/s320/keyattr2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5323429267534333938" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-6630505699943804955?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/6630505699943804955/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=6630505699943804955' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/6630505699943804955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/6630505699943804955'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/key-attributes.html' title='key attributes'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_nF2AQDhdiZc/SeCez6LlohI/AAAAAAAABBk/lTa2c-wf8Do/s72-c/keyattr1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-1660420999305081794</id><published>2009-04-11T06:40:00.001-07:00</published><updated>2009-04-11T06:41:06.584-07:00</updated><title type='text'>attribute types</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_nF2AQDhdiZc/SeCd5cW_LlI/AAAAAAAABBU/MEa4nQIidi4/s1600-h/attributetype1.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 264px; height: 177px;" src="http://3.bp.blogspot.com/_nF2AQDhdiZc/SeCd5cW_LlI/AAAAAAAABBU/MEa4nQIidi4/s320/attributetype1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5323428369742638674" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_nF2AQDhdiZc/SeCdyEFeYrI/AAAAAAAABBM/Or2XsDvhG6E/s1600-h/attributetype2.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 259px; height: 200px;" src="http://1.bp.blogspot.com/_nF2AQDhdiZc/SeCdyEFeYrI/AAAAAAAABBM/Or2XsDvhG6E/s320/attributetype2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5323428242967650994" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-1660420999305081794?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/1660420999305081794/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=1660420999305081794' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/1660420999305081794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/1660420999305081794'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/attribute-types.html' title='attribute types'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_nF2AQDhdiZc/SeCd5cW_LlI/AAAAAAAABBU/MEa4nQIidi4/s72-c/attributetype1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-3433786548799204632</id><published>2009-04-11T06:24:00.000-07:00</published><updated>2009-04-11T06:25:55.472-07:00</updated><title type='text'>entities and attributes</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_nF2AQDhdiZc/SeCaPTKDWdI/AAAAAAAABBE/jn0c3VorZAI/s1600-h/Screenshot9.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 274px; height: 195px;" src="http://3.bp.blogspot.com/_nF2AQDhdiZc/SeCaPTKDWdI/AAAAAAAABBE/jn0c3VorZAI/s320/Screenshot9.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5323424347183077842" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-3433786548799204632?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/3433786548799204632/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=3433786548799204632' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/3433786548799204632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/3433786548799204632'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/entities-and-attributes.html' title='entities and attributes'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_nF2AQDhdiZc/SeCaPTKDWdI/AAAAAAAABBE/jn0c3VorZAI/s72-c/Screenshot9.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-4264607526508350437</id><published>2009-04-11T06:22:00.000-07:00</published><updated>2009-04-11T06:23:10.796-07:00</updated><title type='text'>entity types &amp; entity sets</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_nF2AQDhdiZc/SeCZrZMjmCI/AAAAAAAABA8/MO5Yg3P-Nbk/s1600-h/Screenshot12.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 268px; height: 180px;" src="http://3.bp.blogspot.com/_nF2AQDhdiZc/SeCZrZMjmCI/AAAAAAAABA8/MO5Yg3P-Nbk/s320/Screenshot12.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5323423730328901666" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-4264607526508350437?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/4264607526508350437/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=4264607526508350437' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/4264607526508350437'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/4264607526508350437'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/entity-types-entity-sets.html' title='entity types &amp; entity sets'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_nF2AQDhdiZc/SeCZrZMjmCI/AAAAAAAABA8/MO5Yg3P-Nbk/s72-c/Screenshot12.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-1777438070869152367</id><published>2009-04-11T06:17:00.001-07:00</published><updated>2009-04-11T06:18:09.764-07:00</updated><title type='text'>conceptual schema</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_nF2AQDhdiZc/SeCYg9pg99I/AAAAAAAABA0/T2fzxovAdOc/s1600-h/Screenshot8.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 277px; height: 177px;" src="http://2.bp.blogspot.com/_nF2AQDhdiZc/SeCYg9pg99I/AAAAAAAABA0/T2fzxovAdOc/s320/Screenshot8.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5323422451623851986" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-1777438070869152367?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/1777438070869152367/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=1777438070869152367' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/1777438070869152367'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/1777438070869152367'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/conceptual-schema.html' title='conceptual schema'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_nF2AQDhdiZc/SeCYg9pg99I/AAAAAAAABA0/T2fzxovAdOc/s72-c/Screenshot8.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-606175066172389325</id><published>2009-04-09T22:23:00.001-07:00</published><updated>2009-04-09T22:24:27.754-07:00</updated><title type='text'>query engine architecture under mysql 5.0</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_nF2AQDhdiZc/Sd7X7WFsF5I/AAAAAAAABAs/Clgz4t-FRN4/s1600-h/Screenshot2.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://2.bp.blogspot.com/_nF2AQDhdiZc/Sd7X7WFsF5I/AAAAAAAABAs/Clgz4t-FRN4/s320/Screenshot2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5322929224140199826" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-606175066172389325?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/606175066172389325/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=606175066172389325' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/606175066172389325'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/606175066172389325'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/query-engine-architecture-under-mysql.html' title='query engine architecture under mysql 5.0'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sd7X7WFsF5I/AAAAAAAABAs/Clgz4t-FRN4/s72-c/Screenshot2.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-8141414349896230109</id><published>2009-04-09T22:15:00.000-07:00</published><updated>2009-04-09T22:17:02.637-07:00</updated><title type='text'>structure of the mysql database</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_nF2AQDhdiZc/Sd7V_FO8RSI/AAAAAAAABAk/t-wO6TkssNs/s1600-h/Screenshot3.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 292px; height: 165px;" src="http://1.bp.blogspot.com/_nF2AQDhdiZc/Sd7V_FO8RSI/AAAAAAAABAk/t-wO6TkssNs/s320/Screenshot3.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5322927089311827234" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;verified under mysql 5.0&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-8141414349896230109?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/8141414349896230109/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=8141414349896230109' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/8141414349896230109'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/8141414349896230109'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/structure-of-mysql-database.html' title='structure of the mysql database'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_nF2AQDhdiZc/Sd7V_FO8RSI/AAAAAAAABAk/t-wO6TkssNs/s72-c/Screenshot3.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-9170376864152677020</id><published>2009-04-09T21:54:00.001-07:00</published><updated>2009-04-09T21:54:59.015-07:00</updated><title type='text'>Disk Data Organization in mysql</title><content type='html'>each database is stored in a separate directory in existing file system.&lt;br /&gt; &lt;br /&gt; Implications:-&lt;br /&gt;&lt;br /&gt;      1) table names are either case sensitive or insensitive depending on the operating system&lt;br /&gt;      2) tables can be dropped/ renamed using OS commands for drop and move&lt;br /&gt;&lt;br /&gt;NB:- tested under mySQL 5.0&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-9170376864152677020?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/9170376864152677020/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=9170376864152677020' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/9170376864152677020'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/9170376864152677020'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/disk-data-organization-in-mysql.html' title='Disk Data Organization in mysql'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-566020570954856116</id><published>2009-04-09T21:49:00.001-07:00</published><updated>2009-04-09T21:51:31.654-07:00</updated><title type='text'>how to set sql-mode in mysql</title><content type='html'>default mode can be set by the command line option --sql-mode="mode"  when starting mysqld&lt;br /&gt;ANSI sql can be selected by using  the --ansi option mode can be changed during the operation by the command &lt;span style="font-weight:bold;"&gt;SET [SESSION|GLOBAL] sql-mode="mode"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;NB:- tested under mysql 5.0&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-566020570954856116?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/566020570954856116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=566020570954856116' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/566020570954856116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/566020570954856116'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/how-to-set-sql-mode-in-mysql.html' title='how to set sql-mode in mysql'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-6171201675650962217</id><published>2009-04-09T21:47:00.000-07:00</published><updated>2009-04-09T21:49:00.550-07:00</updated><title type='text'>version specific execution in MySQL</title><content type='html'>Ex:- select /*!323 DISTINCT*/ name from employee;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-6171201675650962217?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/6171201675650962217/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=6171201675650962217' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/6171201675650962217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/6171201675650962217'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/version-specific-execution-in-mysql.html' title='version specific execution in MySQL'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-9005008117267863452</id><published>2009-04-05T10:59:00.001-07:00</published><updated>2009-04-05T10:59:58.597-07:00</updated><title type='text'>Reduce the incidence of "bad" data by activating strict mode</title><content type='html'>The MySQL server can be run in a number of different "modes", each one optimized for a particular purpose. By default, no modes are set; however, it's easy to alter this and run MySQL in "strict mode" by adding the following option to the server command line:&lt;br /&gt;shell&gt; mysqld --sql_mode="STRICT_ALL_TABLES" &amp;&lt;br /&gt;&lt;br /&gt;In strict mode, many of the server's automatic corrections are disabled, with MySQL aborting query execution and returning an error instead of internally correcting the bad input. Stricter date checking is also implemented in this mode.&lt;br /&gt;&lt;br /&gt;Note: This mode is only available in MySQL 5.0.2 and better&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-9005008117267863452?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/9005008117267863452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=9005008117267863452' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/9005008117267863452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/9005008117267863452'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/reduce-incidence-of-bad-data-by.html' title='Reduce the incidence of &quot;bad&quot; data by activating strict mode'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-1881771996404338341</id><published>2009-04-05T10:56:00.000-07:00</published><updated>2009-04-05T10:58:08.277-07:00</updated><title type='text'>Quickly rebuild indexes</title><content type='html'>Normally, every time you make changes to the server's full-text search variables, you need to rebuild the full-text indexes on your tables to ensure that your changes are reflected. This can take a fair amount of time, especially if you have a large volume of data. A quicker alternative is to use the REPAIR TABLE command. Here's how:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_nF2AQDhdiZc/SdjxA8Wlm2I/AAAAAAAABAc/NL_M6aGq5aQ/s1600-h/snapshot36.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 122px;" src="http://3.bp.blogspot.com/_nF2AQDhdiZc/SdjxA8Wlm2I/AAAAAAAABAc/NL_M6aGq5aQ/s320/snapshot36.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5321267958241401698" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;NB:- applies to MySQL 4.1.x and/or MySQL 5.0.x.&lt;br /&gt;&lt;br /&gt;source:-&lt;span style="font-weight:bold;"&gt; http://articles.techrepublic.com.com/5100-10878_11-5998264.html?tag=rbxccnbtr1&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-1881771996404338341?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/1881771996404338341/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=1881771996404338341' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/1881771996404338341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/1881771996404338341'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/quickly-rebuild-indexes.html' title='Quickly rebuild indexes'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_nF2AQDhdiZc/SdjxA8Wlm2I/AAAAAAAABAc/NL_M6aGq5aQ/s72-c/snapshot36.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-1627550008617017416</id><published>2009-04-05T10:50:00.000-07:00</published><updated>2009-04-05T10:53:21.738-07:00</updated><title type='text'>Automatically retrieve create table code</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_nF2AQDhdiZc/SdjvdNxYB_I/AAAAAAAABAU/v5fIOXLwyPw/s1600-h/snapshot35.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 208px;" src="http://3.bp.blogspot.com/_nF2AQDhdiZc/SdjvdNxYB_I/AAAAAAAABAU/v5fIOXLwyPw/s320/snapshot35.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5321266244930242546" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;NB:- applies to MySQL 4.1.x and/or MySQL 5.0.x.&lt;br /&gt;&lt;br /&gt;source:-&lt;span style="font-weight:bold;"&gt; http://articles.techrepublic.com.com/5100-10878_11-5998264.html?tag=rbxccnbtr1&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-1627550008617017416?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/1627550008617017416/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=1627550008617017416' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/1627550008617017416'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/1627550008617017416'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/nb-applies-to-mysql-4.html' title='Automatically retrieve create table code'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_nF2AQDhdiZc/SdjvdNxYB_I/AAAAAAAABAU/v5fIOXLwyPw/s72-c/snapshot35.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-2867276829929753685</id><published>2009-04-05T10:44:00.000-07:00</published><updated>2009-04-05T10:47:21.234-07:00</updated><title type='text'>Monitor the server</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_nF2AQDhdiZc/SdjuJwX-0nI/AAAAAAAABAM/x7kDBQrzL5A/s1600-h/snapshot34.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 182px;" src="http://4.bp.blogspot.com/_nF2AQDhdiZc/SdjuJwX-0nI/AAAAAAAABAM/x7kDBQrzL5A/s320/snapshot34.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5321264811109962354" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;NB:- applies to MySQL 4.1.x and/or MySQL 5.0.x.&lt;br /&gt;&lt;br /&gt;source:-&lt;span style="font-weight:bold;"&gt; http://articles.techrepublic.com.com/5100-10878_11-5998264.html?tag=rbxccnbtr1&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-2867276829929753685?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/2867276829929753685/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=2867276829929753685' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/2867276829929753685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/2867276829929753685'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/monitor-server.html' title='Monitor the server'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_nF2AQDhdiZc/SdjuJwX-0nI/AAAAAAAABAM/x7kDBQrzL5A/s72-c/snapshot34.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-7324802806350511877</id><published>2009-04-05T10:39:00.000-07:00</published><updated>2009-04-05T12:34:18.429-07:00</updated><title type='text'>Dump table data in CSV format</title><content type='html'>Normally, a MySQL dump file contains a complete list of the SQL commands needed to recreate the table. This is very handy if you intend to import the dump file back into MySQL at a later date, but isn't such a great idea if your target application (for example, Excel) doesn't understand SQL. In such situations, you can save yourself some time by telling MySQL to create dump files in CSV format, which can be easily imported into most applications. Here's how to do it using mysqldump:&lt;br /&gt;shell&gt; mysqldump -T . --fields-terminated-by=", " mydbmytable&lt;br /&gt;&lt;br /&gt;or better yet &lt;br /&gt;&lt;br /&gt; sudo mysqldump -u root -p  -T /var/lib/mysql  --fields-terminated-by=", " mydb mytable&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This will produce a text file in the current directory, containing the records from the table mydb.mytable in comma-delimited format&lt;br /&gt;&lt;br /&gt;NB:-&lt;br /&gt;     The -T flag followed by the directory name is where MySQL will write its files to. You can have a space between the -T and the start of the directory name or no space: it's up to you as either will work. It is important to note that the directory you specify must be writeable by the user the MySQL server runs as. If it is not, you'll get an error like this:   &lt;br /&gt;&lt;br /&gt;NB:- applies to MySQL 4.1.x and/or MySQL 5.0.x.&lt;br /&gt;&lt;br /&gt;source:-&lt;span style="font-weight:bold;"&gt; http://articles.techrepublic.com.com/5100-10878_11-5998264.html?tag=rbxccnbtr1&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-7324802806350511877?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/7324802806350511877/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=7324802806350511877' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/7324802806350511877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/7324802806350511877'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/dump-table-data-in-csv-format.html' title='Dump table data in CSV format'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-4228921610337034163</id><published>2009-04-05T10:33:00.001-07:00</published><updated>2009-04-05T10:37:50.229-07:00</updated><title type='text'>View query results in XML format</title><content type='html'>You can have MySQL return query results to you in well-formed XML (instead of the traditional tabular format), by invoking the MySQL command-line client with the additional --xml option. This is useful if you plan to integrate the query output with some other application. Here's an example:&lt;br /&gt;&lt;br /&gt;Listing A&lt;br /&gt;&lt;br /&gt;shell&gt; mysql --xml&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_nF2AQDhdiZc/Sdjr64OwDRI/AAAAAAAABAE/Qm1v-F8LQLc/s1600-h/snapshot33.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 216px;" src="http://2.bp.blogspot.com/_nF2AQDhdiZc/Sdjr64OwDRI/AAAAAAAABAE/Qm1v-F8LQLc/s320/snapshot33.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5321262356497435922" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;NB:- applies to MySQL 4.1.x and/or MySQL 5.0.x.&lt;br /&gt;&lt;br /&gt;source:-&lt;span style="font-weight:bold;"&gt; http://articles.techrepublic.com.com/5100-10878_11-5998264.html?tag=rbxccnbtr1&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-4228921610337034163?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/4228921610337034163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=4228921610337034163' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/4228921610337034163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/4228921610337034163'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/view-query-results-in-xml-format.html' title='View query results in XML format'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sdjr64OwDRI/AAAAAAAABAE/Qm1v-F8LQLc/s72-c/snapshot33.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-6623927345244056938</id><published>2009-04-05T10:28:00.000-07:00</published><updated>2009-04-05T10:30:49.886-07:00</updated><title type='text'>Create a more useful command prompt</title><content type='html'>By default, the MySQL command-line client displays a simple mysql&gt; prompt. However, you can use special modifiers to alter this prompt and make it more useful, by including the name of the currently-logged in user, the host name, and the currently-selected database. Here's how:&lt;br /&gt;Listing G&lt;br /&gt;&lt;br /&gt;mysql&gt; prompt \U:/\d&gt;&lt;br /&gt;PROMPT set to '\U:/\d&gt;'&lt;br /&gt;root@localhost:/db1&gt;&lt;br /&gt;&lt;br /&gt;You can obtain a complete list of modifiers supported by the MySQL client from the &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;http://dev.mysql.com/doc/refman/5.1/en/mysql-commands.html&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;NB:- applies to MySQL 4.1.x and/or MySQL 5.0.x.&lt;br /&gt;&lt;br /&gt;source:-&lt;span style="font-weight:bold;"&gt; http://articles.techrepublic.com.com/5100-10878_11-5998264.html?tag=rbxccnbtr1&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-6623927345244056938?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/6623927345244056938/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=6623927345244056938' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/6623927345244056938'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/6623927345244056938'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/create-more-useful-command-prompt.html' title='Create a more useful command prompt'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-4425849060939168902</id><published>2009-04-05T10:14:00.000-07:00</published><updated>2009-04-05T10:15:54.813-07:00</updated><title type='text'>Save disk space by compressing MySQL tables</title><content type='html'>Takeaway: Databases with thousands of records can take up a lot of hard disk space. MySQL has built-in commands and utilities that can compress MyISAM tables.&lt;br /&gt;&lt;br /&gt;The popular MySQL open-source RDBMS can handle tables containing hundreds of thousands of records without breaking a sweat. In fact, this scalability is one of the reasons it's becoming so popular with large organizations and their massive databases.&lt;br /&gt;&lt;br /&gt;As you might imagine, however, a database with 100,000 records consumes a fair amount of disk space. And if you're a database administrator, you might have wondered if it was possible to somehow optimize MySQL's use of disk space when dealing with such databases.&lt;br /&gt;&lt;br /&gt;Well, there is.&lt;br /&gt;&lt;br /&gt;MySQL comes with a built-in tool, myisampack, to "pack", or compress, MyISAM tables (MySQL's default table format) so that they use less disk space. The myisampack command works equally well on small and large MyISAM tables, so even if you have a database with a few hundred records, you can use myisampack to compress it and save yourself a little disk space.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Step 1: Evaluate suitability&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As with most good things, myisampack comes with one important caveat: tables compressed with it become read-only. This means that you can't use INSERT, UPDATE or DELETESQL commands to change the table, once compressed. To alter data in a compressed table, you will need to first uncompress it, execute SQL commands to change its contents, and then re-compress it.&lt;br /&gt;&lt;br /&gt;Because of this, it's important to spend some time thinking about which of your application's tables should be compressed, and which should be left uncompressed. A good rule of thumb here is to only compress those MyISAM tables that contain non-volatile data, or data that won't change during the application life cycle. Examples of such data could be country and city listings, Web site category listings, application configuration defaults.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Step 2: Compress table(s)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Once you've decided which table(s) to compress, check them with myisamchk to ensure that they don't contain any errors:&lt;br /&gt;shell&gt; myisamchk movies.MYI&lt;br /&gt;Checking MyISAM file: movies.MYI&lt;br /&gt;Data records:     146   Deleted blocks:       0&lt;br /&gt;- check file-size&lt;br /&gt;- check record delete-chain&lt;br /&gt;- check key delete-chain&lt;br /&gt;- check index reference&lt;br /&gt;- check data record references index: 1&lt;br /&gt;- check record links&lt;br /&gt;&lt;br /&gt;Note: If you discover errors at this stage, you can fix them by running myisamchk with the -r option.&lt;br /&gt;&lt;br /&gt;Assuming no errors, proceed to compress the table(s) with myisampack. You will need to pass myisampack the path to the table's .MYI file, as in the example below:&lt;br /&gt;shell&gt; myisampackmovies.MYI&lt;br /&gt;Compressing movies.MYD: (146 records)&lt;br /&gt;- Calculating statistics&lt;br /&gt;- Compressing file&lt;br /&gt;41.05%&lt;br /&gt;Remember to run myisamchk -rq on compressed tables&lt;br /&gt;&lt;br /&gt;Once myisampack has finished compressing the table, it will print the compression percentage for the table.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Step 3: Rebuild table indices&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Once the table(s) have been successfully compressed, you need to rebuild the table indices. The myisamchk command can do this too, when invoked with the -rq option.&lt;br /&gt;shell&gt; myisamchk -rqmovies.MYI&lt;br /&gt;- check record delete-chain&lt;br /&gt;- recovering (with sort) MyISAM-table 'movies.MYI'&lt;br /&gt;Data records: 146&lt;br /&gt;- Fixing index 1&lt;br /&gt;&lt;br /&gt;You should now verify that the compressed table is free of errors, again with myisamchk:&lt;br /&gt;shell&gt; myisamchk movies.MYI&lt;br /&gt;Checking MyISAM file: movies.MYI&lt;br /&gt;Data records:     146   Deleted blocks:       0&lt;br /&gt;- check file-size&lt;br /&gt;- check record delete-chain&lt;br /&gt;- check key delete-chain&lt;br /&gt;- check index reference&lt;br /&gt;- check data record references index: 1&lt;br /&gt;- check record links&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Step 4: Reload the compressed table(s)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Once the table(s) have been successfully compressed, you need to tell MySQL about them and force the RDBMS to reload the compressed, read-only versions. This is easily accomplished by issuing the FLUSH TABLE command to MySQL using the command-line MySQL client, as follows:&lt;br /&gt;mysql&gt; FLUSH TABLE movies;&lt;br /&gt;Query OK, 0 rows affected (0.05 sec)&lt;br /&gt;&lt;br /&gt;You can now verify the table data with a SELECT query, as follows:&lt;br /&gt;mysql&gt; SELECT title FROM movies;&lt;br /&gt;+---------------------+&lt;br /&gt;| title                         |&lt;br /&gt;+---------------------+&lt;br /&gt;| Drive Me Crazy       |&lt;br /&gt;| The Insider              |&lt;br /&gt;| The Bachelor           |&lt;br /&gt;| The Bone Collector  |&lt;br /&gt;   ...&lt;br /&gt;+---------------------+&lt;br /&gt;4 rows in set (0.00 sec)&lt;br /&gt;&lt;br /&gt;Notice that any attempt to change the compressed table—for example, with a DELETE query—will fail:&lt;br /&gt;mysql&gt; DELETE FROM movies WHERE id=146;&lt;br /&gt;ERROR 1036 (HY000): Table 'movies' is read only&lt;br /&gt;&lt;br /&gt;And you're done!&lt;br /&gt;&lt;br /&gt;Note: To uncompress a MyISAM table packed with myisampack, invoke myisampack as in Step 2 and pass it the additional --unpack option. Here's an example:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;http://articles.techrepublic.com.com/5100-10878_11-5852557.html&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-4425849060939168902?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/4425849060939168902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=4425849060939168902' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/4425849060939168902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/4425849060939168902'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/save-disk-space-by-compressing-mysql.html' title='Save disk space by compressing MySQL tables'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-6084907163298715515</id><published>2009-04-05T01:14:00.000-07:00</published><updated>2009-04-05T01:15:09.970-07:00</updated><title type='text'>enabling/disabling query log without restart in mysql</title><content type='html'>set sql_log_off = ‘ON’;&lt;br /&gt;turns of the log without restarting&lt;br /&gt;&lt;br /&gt;set sql_log_off = ‘OFF’;&lt;br /&gt;turns it back on&lt;br /&gt;&lt;br /&gt;this works on 5.0, anyway&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-6084907163298715515?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/6084907163298715515/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=6084907163298715515' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/6084907163298715515'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/6084907163298715515'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/enablingdisabling-query-log-without.html' title='enabling/disabling query log without restart in mysql'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-3525965145217600750</id><published>2009-04-05T01:01:00.000-07:00</published><updated>2009-04-05T01:07:16.229-07:00</updated><title type='text'>LOG and status files in mysql</title><content type='html'>The general query log contains a record of when clients connect and disconnect, and the text of every single query received by the server(whether or not it was processed successfully). This log is useful for determining the frequency of a given type of a statement or for troubleshooting queries that are not otherwise logged.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; The binary log contains a record of queries that update data. it is stored in binary format, but its content can be viewed usin g the mysqlbinlog utility. the server logs only successful queries to this file, and only queries that modify data.(For ex, the server logs DELETE statements to the binary log, but not select statements ) the binary log is used for communication between master and slave replication servers. it can also be used in data recovery.&lt;br /&gt;&lt;br /&gt;the slow query log contains the text queries that take a long time to execute, as well as information about their execution status. By Default, a long time is more than 10 seconds. this can be changed by setting the long_query_time server variable. if the server is started with the --log-long-format option, it also writes to the slow query log queries for which no index was used, whether or not queries took a long time to execute. the contents of the log file are helpful for identifying queries that should be optimized.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;none of the preceeding logs are enabled by default. you must enable them explicitly using  appropriate startup options, which are shown in the following tables. each option may be given in --option  or --option=file_name form. if no filename is specified, the server uses a default name, as shown in the table&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_nF2AQDhdiZc/SdhmIOK61nI/AAAAAAAAA_8/A9V026fAoJk/s1600-h/snapshot32.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 80px;" src="http://1.bp.blogspot.com/_nF2AQDhdiZc/SdhmIOK61nI/AAAAAAAAA_8/A9V026fAoJk/s320/snapshot32.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5321115251167123058" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;By  default, each log file is created under the data directory unless you specify an absolute pathname. host_name stands for the server host name. nnn in the name means that the server writes a numbered series of logs, creating a new log each time the server starts up or the logs are flushed.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-3525965145217600750?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/3525965145217600750/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=3525965145217600750' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/3525965145217600750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/3525965145217600750'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/log-and-status-files-in-mysql.html' title='LOG and status files in mysql'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_nF2AQDhdiZc/SdhmIOK61nI/AAAAAAAAA_8/A9V026fAoJk/s72-c/snapshot32.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-296942248565160945</id><published>2009-04-04T09:13:00.000-07:00</published><updated>2009-04-04T09:15:27.831-07:00</updated><title type='text'>mysqlaccess</title><content type='html'>&lt;span style="font-weight:bold;"&gt;&lt;/span&gt;mysqlaccess [host] user database [options]&lt;br /&gt;&lt;br /&gt;Use this to check privileges of a user for a specific host and database. This utility is executed from the command line, so it can be useful, for instance, as a preliminary tool to check for user permissions before proceeding with a customized program that uses one of the APIs.&lt;br /&gt;With regard to the syntax, the hostname is the first argument and is optional. If not given, localhost is assumed. The username given in the second argument is the name of the user for which the utility is checking privileges. The third argument is the database for which it is checking against. The fourth argument involves several possible options, one of which could be the username by which the utility will access the server to gather information on the user named in the second argument. Here is an example of how you might use this utility:&lt;br /&gt;&lt;br /&gt;mysqlaccess localhost marie db1 -U russell -P&lt;br /&gt;&lt;br /&gt;In this example, the utility is given the hostname, then the user for which I'm inquiring about, then the database name for which I want user privilege information. The -U option is used to specify the username with which to access the server to gather information. This user has full access to the mysql database. The -P instructs the utility to prompt me for a password. The results of the preceding inquiry is shown here:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_nF2AQDhdiZc/SdeHat3zH2I/AAAAAAAAA_0/Jta6EiZK6Kk/s1600-h/snapshot31.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 184px;" src="http://3.bp.blogspot.com/_nF2AQDhdiZc/SdeHat3zH2I/AAAAAAAAA_0/Jta6EiZK6Kk/s320/snapshot31.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5320870377821511522" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;First, a table is presented displaying the privileges for the combination of the database named, the host given, and the user. This user has only SELECT privileges.&lt;br /&gt;Additionally, the results are given in raw form for each component. This user's privileges are the same for all databases and hosts (i.e., there are no entries in the db or the host tables in the mysql database), so there aren't any results for those particular components. For the user component, the command displays details without labels, but they are presented in the order that they are found in the user table in the mysql database. The third field is the password in the encrypted format that it stored. The Ys and Ns are the settings for each user privilege.&lt;br /&gt;Several options are available with this utility. Here is an alphabetical list:&lt;br /&gt;--brief, -b &lt;br /&gt;Provides a brief display of results from an inquiry. &lt;br /&gt;--commit &lt;br /&gt;Copies grant rules from temporary tables to the grant tables. &lt;br /&gt;--copy &lt;br /&gt;Reloads temporary tables with original data from the grant tables so that privileges take effect. &lt;br /&gt;--db= database, -d database &lt;br /&gt;Explicitly specifies the database against which to query the user privileges. &lt;br /&gt;--debug= level &lt;br /&gt;Sets the debugging level. The choices are from 0 to 3. &lt;br /&gt;--help, -? &lt;br /&gt;Displays basic help information. &lt;br /&gt;--host= host, -h host &lt;br /&gt;Specifies the host on which to obtain privilege information. The localhost is the default. &lt;br /&gt;--howto &lt;br /&gt;Displays basic examples of usage with sample results. &lt;br /&gt;--old-server &lt;br /&gt;Stipulates that the server to which the utility is connecting is running an older version of MySQL (prior to 3.21) requiring a different method with regard to WHERE clauses in SQL statements. &lt;br /&gt;--password= password, -p password &lt;br /&gt;Provides the password of the user logging into the server, not the user on which to check for privileges. &lt;br /&gt;--plan &lt;br /&gt;Displays plans for further development of the utility by its developers. &lt;br /&gt;--preview &lt;br /&gt;Displays the differences in temporary grant tables before they are committed. &lt;br /&gt;--relnotes &lt;br /&gt;Displays notes on each release of the utility. &lt;br /&gt;--rhost= host, -H host &lt;br /&gt;If the utility is not being run on the same server as the MySQL server that's being queried, use this option to specify the address of the MySQL server to query. &lt;br /&gt;--rollback &lt;br /&gt;Undoes the last change to user privileges. &lt;br /&gt;--spassword= password, -P password &lt;br /&gt;Provides the password when using a superuser. &lt;br /&gt;--superuser= user, -U user &lt;br /&gt;Provides a superuser's username. &lt;br /&gt;--table, -t &lt;br /&gt;Instructs the utility to display data in an ASCII table format. &lt;br /&gt;--user= user, -u user &lt;br /&gt;Provides the username for logging in to the server, not the user on which to check for privileges. &lt;br /&gt;--version, -v &lt;br /&gt;Displays the version of the utility.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-296942248565160945?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/296942248565160945/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=296942248565160945' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/296942248565160945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/296942248565160945'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/mysqlaccess.html' title='mysqlaccess'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_nF2AQDhdiZc/SdeHat3zH2I/AAAAAAAAA_0/Jta6EiZK6Kk/s72-c/snapshot31.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-3665082691596612323</id><published>2009-04-04T09:11:00.000-07:00</published><updated>2009-04-04T09:12:04.271-07:00</updated><title type='text'>mysqlhotcopy database [path]</title><content type='html'>&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;mysqlhotcopy database [path]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Use this to make backup copies of databases while the server is active. It only works on MyISAM and ISAM tables, though. It makes a simple copy of each database directory and each table file. This results in a separate directory for each database and usually three files for each table: one for the schema, another for the data, and a third for the index. It places a read lock on all of the tables in the database while copying them. Here is an example of how you can copy a database with mysqlhotcopy:&lt;br /&gt;mysqlhotcopy -u russell -p password db1 /tmp/backup&lt;br /&gt;&lt;br /&gt;Note that unlike other MySQL utilities, there is a space between the -p and the password. Next the database (db1) is specified. Finally, the path to write the backup directories is given. To restore databases or tables that were copied by mysqlhotcopy, just copy the table files to be restored to their original data directories. Here are the following options:&lt;br /&gt;&lt;br /&gt;--addtodest &lt;br /&gt;Instructs the utility not to abort the session or to rename the backup directory, but to add new files to the directory. &lt;br /&gt;&lt;br /&gt;--allowold &lt;br /&gt;Instructs the utility to rename an existing backup directory to *_old so that the copying may be completed. If the new copy is successful, the old directory is deleted. If it's unsuccessful, the old directory is restored. &lt;br /&gt;&lt;br /&gt;--checkpoint= database.table &lt;br /&gt;Instructs the utility to save logging information to the named database and table. &lt;br /&gt;&lt;br /&gt;--debug &lt;br /&gt;Used to enable debugging information. &lt;br /&gt;&lt;br /&gt;--dryrun, -n &lt;br /&gt;This option has the utility test the backup process without actually making a copy. &lt;br /&gt;&lt;br /&gt;--flushlog &lt;br /&gt;Instructs the utility to flush logs after all tables are locked. &lt;br /&gt;&lt;br /&gt;--help, -? &lt;br /&gt;Displays basic help information. &lt;br /&gt;&lt;br /&gt;--keepold &lt;br /&gt;Instructs the utility when using the --allowold option not to delete the old directory if the copying is successful. &lt;br /&gt;&lt;br /&gt;--method= method &lt;br /&gt;Sets the method used by the utility for copying files. The choices are cp or scp. &lt;br /&gt;&lt;br /&gt;--noindices &lt;br /&gt;Instructs the utility to copy only the headers of index files. Indexes may be rebuilt when restoring copies. &lt;br /&gt;--password= password, -p password &lt;br /&gt;&lt;br /&gt;Provides the password to pass to the server. A space is permitted after the -p option, before the password. &lt;br /&gt;--port= port, -P port &lt;br /&gt;&lt;br /&gt;Specifies the port number to use for connecting to the server. &lt;br /&gt;--quiet, -q &lt;br /&gt;&lt;br /&gt;Suppresses all messages except for error messages. &lt;br /&gt;--regexp= expression &lt;br /&gt;&lt;br /&gt;Provides a regular expression for determining which databases to copy based on the name. &lt;br /&gt;--resetmaster &lt;br /&gt;&lt;br /&gt;Instructs the utility to execute a RESET MASTER statement after tables are locked. &lt;br /&gt;--resetslave &lt;br /&gt;&lt;br /&gt;Instructs the utility to execute a RESET SLAVE statement after tables are locked. &lt;br /&gt;--socket= filename, -S filename &lt;br /&gt;&lt;br /&gt;Provides the path and name of the server's socket file. &lt;br /&gt;--sufix= string &lt;br /&gt;&lt;br /&gt;Specifies the suffix for the copies of databases. The default is _copy. &lt;br /&gt;--tmpdir= path &lt;br /&gt;&lt;br /&gt;Specifies the temporary directory to use. The default is /tmp. &lt;br /&gt;--user= user, -u user &lt;br /&gt;&lt;br /&gt;Specifies the username for connecting to the server.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-3665082691596612323?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/3665082691596612323/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=3665082691596612323' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/3665082691596612323'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/3665082691596612323'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/mysqlhotcopy-database-path.html' title='mysqlhotcopy database [path]'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-3263285245271826388</id><published>2009-04-04T09:07:00.000-07:00</published><updated>2009-04-04T09:09:25.044-07:00</updated><title type='text'>mysqlbug</title><content type='html'>This is a script for reporting bugs to MySQL AB developers. Executed at the command line of the server, this script gathers information on the version of MySQL and related libraries installed, the operating system, as well as how MySQL was compiled.&lt;br /&gt;&lt;br /&gt;To run the utility, simply type the command without any options or arguments. After a few moments a text editor (e.g., Emacs) will be started with a form for reporting the bug. Several of the details will be filled in with information gathered by the script. You can modify this information, and you are expected to answer questions about the bug discovered. This includes a description of how to reproduce the problem or what circumstances occurred that may have caused or contributed to the problem. If you discovered a workaround solution, report this, as well. The report created (saved in the /tmp directory on Unix systems) should be emailed to &lt;span style="font-weight:bold;"&gt;dev-bugs@mysql.com.&lt;/span&gt; Go to &lt;span style="font-weight:bold;"&gt;http://bugs.mysql.com&lt;/span&gt; to report bugs online.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-3263285245271826388?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/3263285245271826388/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=3263285245271826388' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/3263285245271826388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/3263285245271826388'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/mysqlbug.html' title='mysqlbug'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-857554026594869654</id><published>2009-04-02T23:52:00.001-07:00</published><updated>2009-04-02T23:52:52.103-07:00</updated><title type='text'>using files from within the mysql command line</title><content type='html'>mysql&gt; source test.sql&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-857554026594869654?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/857554026594869654/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=857554026594869654' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/857554026594869654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/857554026594869654'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/using-files-from-within-mysql-command.html' title='using files from within the mysql command line'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-3438886531001441967</id><published>2009-04-02T23:50:00.000-07:00</published><updated>2009-04-04T11:32:14.238-07:00</updated><title type='text'>delete vs truncate operations in mysql</title><content type='html'>delete from sales;&lt;br /&gt;    Query OK, 6 rows affected (0.00 sec)&lt;br /&gt;&lt;br /&gt;    now we  re insert records to the table&lt;br /&gt; &lt;br /&gt;    truncate sales;&lt;br /&gt;    Query OK, 0 rows affected (0.00 sec)&lt;br /&gt;    &lt;br /&gt;delete informs you how many rows have been removed,but TRUNCATE doesn't;TRUNCATE just removes the lot without counting them.it actually does this by dropping and re-creating the table;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt; if a table contains an AUTO_INCREMENT column, emptying it completly with either TRUNCATE TABLE or a DELETE that includes no WHERE cluase might have the effect of resetting the sequence. in this case, the next record inserted into the table is assigned an AUTO_INCREMENT value of 1. if this side effect is undesirable, empty the table using a WHERE clause that will always evaluates to true&lt;br /&gt;ex:- DELETE FROM table_name WHERE 1;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-3438886531001441967?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/3438886531001441967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=3438886531001441967' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/3438886531001441967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/3438886531001441967'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/delete-vs-truncate-operations-in-mysql.html' title='delete vs truncate operations in mysql'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-3059959417944132468</id><published>2009-04-02T22:21:00.000-07:00</published><updated>2009-04-04T23:11:21.221-07:00</updated><title type='text'>How to get the list of tables in mysql from a particular database, based on engine type(MyISAM,InnoDB,MERGE,HEAP,BDB etc) ?</title><content type='html'>SHOW TABLE STATUS FROM [name of database];&lt;br /&gt;&lt;br /&gt;This also shows other information that might be of interest.ex :- it displays when a table was created or last modified &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;or better yet&lt;br /&gt;&lt;br /&gt;$ mysql -u username -p -e "SHOW TABLE STATUS FROM database_name" | awk '{print $1, $2}'|column -t&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt; source sujoy&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;SELECT DISTINCT `TABLE_NAME`FROM information_schema.tables &lt;br /&gt;WHERE table_schema = "medvista"&lt;br /&gt;AND ENGINE = "MyISAM";&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-3059959417944132468?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/3059959417944132468/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=3059959417944132468' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/3059959417944132468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/3059959417944132468'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/how-to-get-list-of-tables-in-mysql-from.html' title='How to get the list of tables in mysql from a particular database, based on engine type(MyISAM,InnoDB,MERGE,HEAP,BDB etc) ?'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-1509515382652881150</id><published>2009-04-02T19:50:00.000-07:00</published><updated>2009-04-02T19:51:27.583-07:00</updated><title type='text'>mysql command line history</title><content type='html'>See the file &lt;span style="font-weight:bold;"&gt;~/.mysql_history&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;see:- http://www.cyberciti.biz/faq/howto-clear-mysql-command-history/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-1509515382652881150?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/1509515382652881150/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=1509515382652881150' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/1509515382652881150'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/1509515382652881150'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/mysql-command-line-history.html' title='mysql command line history'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-7226245242215175277</id><published>2009-04-02T19:48:00.000-07:00</published><updated>2009-04-02T19:49:34.836-07:00</updated><title type='text'>example for enum column type in mysql</title><content type='html'>alter table complaints&lt;br /&gt;change range&lt;br /&gt;rage enum('polite','aggrieved','irate','furious','abusive') not null;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-7226245242215175277?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/7226245242215175277/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=7226245242215175277' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/7226245242215175277'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/7226245242215175277'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/example-for-enum-column-type-in-mysql.html' title='example for enum column type in mysql'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-6249935213320473640</id><published>2009-04-02T02:30:00.000-07:00</published><updated>2009-04-06T00:08:11.716-07:00</updated><title type='text'>various table types in mysql</title><content type='html'>&lt;span style="font-weight:bold;"&gt; MyISAM tables&lt;/span&gt;&lt;br /&gt;    --------------&lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;    MyISAM data files are given the extension .MYD and the indexes have the extension .MYI&lt;br /&gt;    &lt;br /&gt;    there are three types of MyISAM tables: static,dynamic or compressed, each table is&lt;br /&gt;    represented in the disk by an .frm format file&lt;br /&gt;    &lt;br /&gt;    static tables are the default format, which exists if there are no varchar,blob or text format&lt;br /&gt;    &lt;br /&gt;    supports FULLTEXT searching&lt;br /&gt;&lt;br /&gt;    can be converted into fast,compressed , read-only tables&lt;br /&gt;   &lt;br /&gt;    can be used to set up MERGE tables &lt;br /&gt;    &lt;br /&gt;   &lt;br /&gt;   &lt;br /&gt;    &lt;span style="font-weight:bold;"&gt;HEAP tables&lt;/span&gt;&lt;br /&gt;    -----------&lt;br /&gt;    &lt;br /&gt;    HEAP tables are the fastest table types because they are stored in memory and use a hashed index.&lt;br /&gt;    &lt;br /&gt;    the downside is that, because they are stored in memory, all the data will be lost in the case of a crash.&lt;br /&gt;    &lt;br /&gt;HEAP tables are often used to give faster access to an already existing table - to leave the orginal table for inserting and updating and then have the new table for fast reading.&lt;br /&gt;    &lt;br /&gt;because heap tables use memory , the tables are always limited by the mysqld variable max_heap_table_size&lt;br /&gt;    &lt;br /&gt;    they cannot be used for order by&lt;br /&gt;    they only use whole key tosearch for a row , not parts of key&lt;br /&gt;    do not support AUTO_INCREMENT column&lt;br /&gt;    do not support BLOB or TEXT columns&lt;br /&gt;    &lt;br /&gt;besides the  max_heap_table_size limit and the memory limit on your machine, a limit of 4GB per table could be reached on some setups because this is the limit imposed by a 32-bit machines address space&lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;    &lt;span style="font-weight:bold;"&gt;InnoDB tables&lt;/span&gt;&lt;br /&gt;    -------------&lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;InnoDB tables are a transaction safe table type(this means you have COMMIT and ROLLBACK capabilities).&lt;br /&gt;    &lt;br /&gt;    InnoDB uses row level locking so that only the row is locked.&lt;br /&gt;    &lt;br /&gt;for performance purposes you should use InnoDB tables if your data performs large numbers of INSERTS or UPDATES relative to SELECTS &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;    BDB tables&lt;br /&gt;   ------------&lt;br /&gt;   &lt;br /&gt;   it is a transaction capable table type&lt;br /&gt;   &lt;br /&gt;   Ex:-&lt;br /&gt;     create table bdbtest(f1 INT, f2 CHAR(10))TYPE=BDB;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style="font-weight:bold;"&gt;MERGE tables&lt;/span&gt;&lt;br /&gt;    ------------&lt;br /&gt;    &lt;br /&gt;    MERGE tables are amalgamations of identical MyISAM tables.you'd normally use them only when your MyISAM tables are getting too big.&lt;br /&gt;    &lt;br /&gt;    more speed in some situations(you could split different tables onto different disks, and use a MERGE table to access them as one table) &lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;create table sales_rep1(&lt;br /&gt;     id INT AUTO_INCREMENT PRIMARY KEY,&lt;br /&gt;     employee_number INT(11),&lt;br /&gt;     surname VARCHAR(40),&lt;br /&gt;     first_name VARCHAR(30),&lt;br /&gt;     commission TINYINT(4),&lt;br /&gt;     date_joined DATE,&lt;br /&gt;     birthday DATE&lt;br /&gt;     )TYPE=MyISAM;&lt;br /&gt; &lt;br /&gt; create table sales_rep2(&lt;br /&gt;     id INT AUTO_INCREMENT PRIMARY KEY,&lt;br /&gt;     employee_number INT(11),&lt;br /&gt;     surname VARCHAR(40),&lt;br /&gt;     first_name VARCHAR(30),&lt;br /&gt;     commission TINYINT(4),&lt;br /&gt;     date_joined DATE,&lt;br /&gt;     birthday DATE&lt;br /&gt;     )TYPE=MyISAM;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; create table sales_rep1_2(&lt;br /&gt;     id INT AUTO_INCREMENT PRIMARY KEY,&lt;br /&gt;     employee_number INT(11),&lt;br /&gt;     surname VARCHAR(40),&lt;br /&gt;     first_name VARCHAR(30),&lt;br /&gt;     commission TINYINT(4),&lt;br /&gt;     date_joined DATE,&lt;br /&gt;     birthday DATE&lt;br /&gt;    )TYPE=MERGE&lt;br /&gt;    UNION=(sales_rep1,sales_rep2);&lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;mysql&gt; insert into sales_rep1 (surname,first_name,commission,date_joined,birthday) values ('Tshwete','Paul',15,'1999-01-03','1970-03-04');&lt;br /&gt;Query OK, 1 row affected (0.01 sec)&lt;br /&gt;&lt;br /&gt;mysql&gt; insert into sales_rep2 (surname,first_name,commission,date_joined,birthday) values ('Grobler','Peggy-Sue',12,'2001-11-19','1956-08-25');&lt;br /&gt;Query OK, 1 row affected (0.00 sec)&lt;br /&gt;&lt;br /&gt;mysql&gt; select first_name, surname from sales_rep1_2;&lt;br /&gt;+------------+---------+&lt;br /&gt;| first_name | surname |&lt;br /&gt;+------------+---------+&lt;br /&gt;| Paul       | Tshwete | &lt;br /&gt;| Peggy-Sue  | Grobler | &lt;br /&gt;+------------+---------+&lt;br /&gt;2 rows in set (0.00 sec)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; when creating MERGE table , you can specify which table to insert to,&lt;br /&gt; &lt;br /&gt; Ex:-  &lt;br /&gt; &lt;br /&gt;     &lt;br /&gt; create table sales_rep1_2(&lt;br /&gt;     id INT AUTO_INCREMENT PRIMARY KEY,&lt;br /&gt;     employee_number INT(11),&lt;br /&gt;     surname VARCHAR(40),&lt;br /&gt;     first_name VARCHAR(30),&lt;br /&gt;     commission TINYINT(4),&lt;br /&gt;     date_joined DATE,&lt;br /&gt;     birthday DATE&lt;br /&gt;    )TYPE=MERGE&lt;br /&gt;    UNION=(sales_rep1,sales_rep2)&lt;br /&gt;    INSERT_METHOD = LAST&lt;br /&gt;    &lt;br /&gt;the INSERT_METHOD can be &lt;span style="font-weight:bold;"&gt;NO,FIRST, or LAST&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-6249935213320473640?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/6249935213320473640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=6249935213320473640' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/6249935213320473640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/6249935213320473640'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/various-table-types-in-mysql.html' title='various table types in mysql'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-7616515805297242595</id><published>2009-04-01T23:47:00.000-07:00</published><updated>2009-04-04T23:18:41.510-07:00</updated><title type='text'>mysqlcheck</title><content type='html'>syntax:- &lt;br /&gt;           mysqlcheck [options] databasename [tablenames] or&lt;br /&gt;           mysqlcheck [options] --databases databasename1 [databasename2, databasename3,....] or &lt;br /&gt;           mysqlcheck [options] --all-databases&lt;br /&gt;            &lt;br /&gt; &lt;br /&gt; &lt;span style="font-weight:bold;"&gt;&lt;br /&gt; analyzing tables with mysqlcheck &lt;/span&gt;&lt;br /&gt; --------------------------------&lt;br /&gt; &lt;br /&gt; the server needs to be running for you to use mysqlcheck, and it works only with MyISAM tables&lt;br /&gt; &lt;br /&gt;  to use it to analyze tables, youn use the -a option&lt;br /&gt; &lt;br /&gt;  ex:-  mysqlcheck -a mydb Persons ajdb users -u root -p; &lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;repairing tables with mysqlcheck&lt;/span&gt;&lt;br /&gt;  --------------------------------&lt;br /&gt;  &lt;br /&gt;  to repair tables use the -r option&lt;br /&gt;  &lt;br /&gt;    mysqlcheck -r databasename tablename[tablenames] -u username -p password;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style="font-weight:bold;"&gt;checking and repairing MyISAM tables:-&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;a recommended table-checking strategy is to run mysqlcheck with no options . if any errors occur, run it again, first with the --repair and --quick options to attempt a quick repair.&lt;br /&gt;if that fails, run mysqlcheck with --repair for a normal repair, and then if necessary with --repair and --force&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-7616515805297242595?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/7616515805297242595/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=7616515805297242595' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/7616515805297242595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/7616515805297242595'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/mysqlcheck.html' title='mysqlcheck'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-4596144274928521124</id><published>2009-04-01T23:07:00.001-07:00</published><updated>2009-04-01T23:08:31.352-07:00</updated><title type='text'>benchmarking function in mysql</title><content type='html'>the BENCHMARK() function  tells you how long it takes MySQL to perform a function a certain no: of times. it can help to give you a basic idea of the&lt;br /&gt; difference in capabilities between machines. &lt;br /&gt; &lt;br /&gt; the syntax is as follows:-&lt;br /&gt; &lt;br /&gt; SELECT BENCHMARK(no: of repetitions,expression);&lt;br /&gt; &lt;br /&gt; Ex:- select BENCHMARK(1000000,SQRT(999));&lt;br /&gt; &lt;br /&gt;&lt;span style="font-style:italic;"&gt;&lt;span style="font-weight:bold;"&gt; Warning:-&lt;/span&gt; you should use BENCHMARK() with caution to compare machines. for a live database, there are many other factors , such as disk speed, which are to be taken into account with this test. its main  aim is to help in the optimization of functions.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-4596144274928521124?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/4596144274928521124/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=4596144274928521124' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/4596144274928521124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/4596144274928521124'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/benchmarking-function-in-mysql.html' title='benchmarking function in mysql'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-2342174013344448025</id><published>2009-04-01T05:40:00.001-07:00</published><updated>2009-04-01T05:40:44.925-07:00</updated><title type='text'>Disabling Network Access in mysql</title><content type='html'>&lt;span style="font-weight:bold;"&gt;skip-networking &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To disable remote access via TCP/IP, add skip-networking to my.cnf, or start mysqld using the --skip-networking switch. MySQL will then only accept connections from the local host via a socket. &lt;br /&gt;If network access is disabled, users are not able to connect to MySQL from remote hosts even if they have a user account that would otherwise allow them to do so. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you do allow remote access to MySQL, any firewall that sits between your MySQL server and the outside world must allow traffic on the appropriate port. By default, this is port 3306.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-2342174013344448025?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/2342174013344448025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=2342174013344448025' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/2342174013344448025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/2342174013344448025'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/disabling-network-access-in-mysql.html' title='Disabling Network Access in mysql'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-6417151682587339819</id><published>2009-04-01T05:02:00.000-07:00</published><updated>2009-04-01T05:06:03.288-07:00</updated><title type='text'>Mysql table terminology</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_nF2AQDhdiZc/SdNYakYg_bI/AAAAAAAAA_c/F2MP_dSnU08/s1600-h/snapshot35.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 162px;" src="http://4.bp.blogspot.com/_nF2AQDhdiZc/SdNYakYg_bI/AAAAAAAAA_c/F2MP_dSnU08/s320/snapshot35.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5319692798321032626" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;The components of a MySQL table are &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1. A table is a structured collection of data, which is composed of...&lt;br /&gt;&lt;br /&gt;2. a body, that contains rows of data and...&lt;br /&gt;&lt;br /&gt;3. a table definition that contains columns that describe the type of data contained in the rows.&lt;br /&gt;&lt;br /&gt;4.&lt;br /&gt;&lt;br /&gt;Each column has a name (such as book_id) and a type (such as INTEGER). Each type is a defined set of values (like integers or letters in the alphabet). If data is of a given type, it must be one of the values from that type (for example, a column with type INTEGER must contain a whole number value such as 1 or 6502, not a string value such as one or a decimal number such as 3.14).&lt;br /&gt;&lt;br /&gt;5. &lt;br /&gt;&lt;br /&gt;Each row contains one value for every column in the heading. The values must be of the type defined in the column to which they correspond. The column book_id is of type SMALLINTonly values of that type may be stored in that position in the row.&lt;br /&gt;&lt;br /&gt;6. The number of columns a relation has defines its degree.&lt;br /&gt;&lt;br /&gt;7. The number of rows a relation has defines its cardinality.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-6417151682587339819?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/6417151682587339819/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=6417151682587339819' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/6417151682587339819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/6417151682587339819'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/mysql-table-terminology.html' title='Mysql table terminology'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_nF2AQDhdiZc/SdNYakYg_bI/AAAAAAAAA_c/F2MP_dSnU08/s72-c/snapshot35.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-2304991303325259203</id><published>2009-04-01T04:48:00.000-07:00</published><updated>2009-04-01T04:54:01.187-07:00</updated><title type='text'>Corrupted Table Data in Mysql</title><content type='html'>&lt;span style="font-weight:bold;"&gt;CHECK TABLE table; &lt;br /&gt;REPAIR TABLE table;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Occasionally the MySQL data files might become corrupt and need repairing. The easiest way to check the integrity of a table is by using the CHECK TABLE SQL command. The following command checks the book table for errors: &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;CHECK TABLE book; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If the output looks similar to the following, the table is okay and does not need any further action: &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_nF2AQDhdiZc/SdNVubLnXCI/AAAAAAAAA_U/arvf_4x2BMo/s1600-h/snapshot34.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 312px; height: 71px;" src="http://2.bp.blogspot.com/_nF2AQDhdiZc/SdNVubLnXCI/AAAAAAAAA_U/arvf_4x2BMo/s320/snapshot34.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5319689840913505314" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Sometimes, however, you see errors in the Msg_text column telling you about problems with the table. When this happens, issue the REPAIR TABLE command, and MySQL attempts to fix the problem. &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;The myisamchk utility that ships with MySQL can be used to check and repair MyISAM tables with a higher degree of flexibility than the SQL commands&lt;/span&gt;. When myisamchk is run with no options, it simply checks a table for errors. A number of command line switches can be added to gain additional information or instruct the utility to begin a repair process. &lt;br /&gt;&lt;br /&gt;The MyISAM table files that myisamchk examines are stored in your data directory and have .MYI file extensions. If your data directory is /var/lib/mysql, you can check all the tables in the sampdb database using the following command: &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;myisamchk /var/lib/mysql/sampdb/*.MYI &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The usual way to perform a quick table check is to use the --fast switch, which checks only tables that have not been properly closed. &lt;br /&gt;&lt;br /&gt;The &lt;span style="font-weight:bold;"&gt;--medium-check option&lt;/span&gt; performs a more thorough check of the tables and finds the vast majority of errors. The --extend-check option is the most thorough option but is very slowonly use this if --medium-check does not find a problem. After you have determined that a table file is corrupt, you can repair it using the --recover switch. &lt;span style="font-weight:bold;"&gt;Before repairing a table with myisamchk, you should stop mysqld&lt;/span&gt; you do not want the MySQL server writing to your table files while you repair them. &lt;br /&gt;&lt;br /&gt;Sometimes myisamchk reports that it cannot fix a problem using this option and then you should try using --safe-recover instead. This option is much slower but also more thorough. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;source scott grannemann&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-2304991303325259203?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/2304991303325259203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=2304991303325259203' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/2304991303325259203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/2304991303325259203'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/corrupted-table-data-in-mysql.html' title='Corrupted Table Data in Mysql'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_nF2AQDhdiZc/SdNVubLnXCI/AAAAAAAAA_U/arvf_4x2BMo/s72-c/snapshot34.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-2647031536008707688</id><published>2009-04-01T04:46:00.000-07:00</published><updated>2009-04-01T04:47:01.223-07:00</updated><title type='text'>Server Crash in mysql</title><content type='html'>If your MySQL server keeps crashing, it's time to file a bug report. Even though MySQL is thoroughly tested, there might still be rare bugs, and you should know how to begin to diagnose this kind of problem. &lt;br /&gt;&lt;br /&gt;First, you should make sure that it is actually the MySQL server that is crashing and not your client program. Check the amount of time that the server has been up by issuing the mysqladmin version command. The output contains a line like this: &lt;br /&gt;&lt;br /&gt;Uptime: 109 days 23 hours 31 min 51 sec &lt;br /&gt;&lt;br /&gt;In this case, the server has been running for a long time, so it is clear that mysqld did not crash. Instead, you need to debug your client program. &lt;br /&gt;&lt;br /&gt;If the uptime reported is very small or mysqld is not running at all after a suspected crash, the first step is to check that your tables are not corrupt. Stop mysqld and run the following command from the data directory to check every table in the system: &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;myisamchk --silent --force */*.MYI &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Restart mysqld with the --log switch, or add log to the [mysqld] section of my.cnf. Every SQL command is logged to a file, and you should try to find a way to reproduce the crash consistently using the same command. You should then query the bugs database at &lt;span style="font-weight:bold;"&gt;http://bugs.mysql.com/&lt;/span&gt; before filing a bug report. &lt;br /&gt;&lt;br /&gt;Another possible cause of your crashes is an underlying hardware problem. In particular, faults with your system's RAM or hard drives can cause peculiar errors in MySQL. Perform a thorough check on your system's hardware if you experience intermittent, unexplained server crashes. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;source scott grannemann&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-2647031536008707688?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/2647031536008707688/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=2647031536008707688' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/2647031536008707688'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/2647031536008707688'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/server-crash-in-mysql.html' title='Server Crash in mysql'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-5243096931798607790</id><published>2009-04-01T04:39:00.000-07:00</published><updated>2009-04-01T04:41:45.380-07:00</updated><title type='text'>Common Errors</title><content type='html'>This section lists some of the most common error messages you will encounter and the steps necessary to work out what is wrong. &lt;br /&gt;Can't Connect to MySQL Server&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;ERROR 2002: Can't connect to local MySQL server&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;through socket '/var/lib/mysql/mysql.sock' (2) &lt;br /&gt;ERROR 2003 (HY000): Can't connect to MySQL server &lt;br /&gt;on '123.45.67.89' (113) &lt;br /&gt;&lt;br /&gt;Usually these errors mean that there is no mysqld process running on the server machine. If you are unable to connect to a local MySQL server, check your system's process list using ps on Unix or Task Manager on Windows and start the MySQL server if it is not running.It's possible that the local socket file has been removed. The default location is /tmp/mysql.sock, and some systems periodically clean out the contents to /tmp. It could even be that another user has deleted this fileinadvertently or otherwisebecause the /tmp directory is often writable by all users. If you experience this issue, change the location of the socket file to another directory owned by the mysql user by adding these lines in my.cnf: &lt;br /&gt;&lt;br /&gt;[mysqld] &lt;br /&gt;socket=/path/to/mysql.sock &lt;br /&gt;[client] &lt;br /&gt;socket=/path/to/mysql.sock &lt;br /&gt;&lt;br /&gt;To check that mysqld is listening on the port you are expecting, use the netstat command to check that it is indeed accepting network connections. On Unix/Linux use this command: &lt;br /&gt;&lt;br /&gt;shell&gt; netstat l &lt;br /&gt;&lt;br /&gt;On Windows, the command is slightly different: &lt;br /&gt;&lt;br /&gt;&gt; netstat a | find "LISTENING" &lt;br /&gt;&lt;br /&gt;If you are unable to connect to a remote MySQL server and you are sure mysqld is running, check your firewall settings. You must allow TCP/IP traffic on port 3306or whatever other port the server runs onto allow remote connections. &lt;br /&gt;&lt;br /&gt;Note that this error message only indicates an incapability to communicate with a MySQL server, not an authentication problem. If you are able to connect to mysqld but use an invalid password, you see one of the errors from the next section. &lt;br /&gt;Access Denied&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;ERROR 1045 (28000): Access denied for user&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;'user'@'host' (using password: YES) &lt;br /&gt;&lt;br /&gt;You might have supplied an incorrect username or password, or a database name that the given username does not have access to when connecting from the current host. Check the privilege tables in the mysql database to make sure the connection arguments are correct.If you use the short p switch instead of password, remember that the password must follow immediately with no space. Otherwise the argument following p is treated as the database name. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Too Many Connections, ERROR 1040: Too many connections&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;The maximum number of simultaneous connections allowed is defined in the max_connections system variable, and the default value is 100. A new value can be set in my.cnf using the following lines: &lt;br /&gt;&lt;br /&gt;[mysqld] &lt;br /&gt;max_connections=200 &lt;br /&gt;&lt;br /&gt;Increasing the max_connections value is usually not the answer. MySQL has exceeded the maximum number of connections for a reason, and you should try to find out why it ran out. You should only increase this value if you are sure your system can support more connections. &lt;br /&gt;In fact, mysqld allows one more connection than the specified number, so a superuser can connect even when the maximum connections have been exceeded. To diagnose problems, run the mysqladmin processlist command and try to work out why there are so many connections. &lt;br /&gt;MySQL Server Has Gone Away&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;ERROR 2006: MySQL server has gone away &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This error usually indicates a timeout where mysqld has closed the connection with the client. The default timeout interval is eight hours, but this value can be changed using the wait_timeout system variableits value is in seconds. When this error is the result of a timeout, the mysql program attempts to reconnect automatically. &lt;br /&gt;You also see this error if the mysqld process stops running while you are connected to a MySQL servereven if it is restarted instantly. If mysql is unable to reconnect, you should check whether mysqld is still running. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Got Error from Table Handler, Error 1030: Got error 141 from table handler &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This error indicates an internal problem with the database table storage file. It can usually be fixed using the myisamchk utility. The error number reported in this message indicates the nature of the problem. Use the perror command from the shell to find the corresponding error message. &lt;br /&gt;&lt;br /&gt;shell&gt; perror 141 &lt;br /&gt;141 = Duplicate unique key or constraint on write &lt;br /&gt;      or update &lt;br /&gt;&lt;br /&gt;When you encounter this kind of error, you should stop mysqld and run myisamchk --recover on the corresponding .MYI file. Sometimes the errors reported are symptomatic of other system issues, as in the following case: &lt;br /&gt;&lt;br /&gt;$ perror 28 &lt;br /&gt;Error code  28: No space left on device &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;source scott grannemann&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-5243096931798607790?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/5243096931798607790/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=5243096931798607790' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/5243096931798607790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/5243096931798607790'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/common-errors.html' title='Common Errors'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-5291172457722234449</id><published>2009-04-01T04:33:00.001-07:00</published><updated>2009-04-01T04:34:36.747-07:00</updated><title type='text'>Mysql Getting Help</title><content type='html'>If you have a troublesome problem and feel you need help to figure it out, you can look to several places. First of all, make sure you have read the relevant sections of the online manual at &lt;span style="font-weight:bold;"&gt;http://dev.mysql.com/doc/refman/5.0/en/index.html&lt;/span&gt;. &lt;br /&gt;&lt;br /&gt;Several MySQL mailing lists cover a wide range of topics, and lists are available for regional user groups and different languages. Check &lt;span style="font-weight:bold;"&gt;http://lists.mysql.com/&lt;/span&gt; for the latest mailing liststhere will almost certainly be one where you can ask for assistance. &lt;br /&gt;&lt;br /&gt;MySQL AB provides technical support for an annual fee with various service levels for those who need the assurance of having somewhere to turn when things do go wrong. All support packages include access to the MySQL Knowledge Base, a search able library of technical articles that often gives you the answers you need very quickly. &lt;br /&gt;&lt;br /&gt;The higher levels of support include 24hour, 7daysaweek telephone assistance, guaranteed emergency response time, and remote troubleshooting by a MySQL expert. For more information, see &lt;span style="font-weight:bold;"&gt;www.mysql.com/support/.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-5291172457722234449?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/5291172457722234449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=5291172457722234449' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/5291172457722234449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/5291172457722234449'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/mysql-getting-help.html' title='Mysql Getting Help'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-2496104484379901387</id><published>2009-04-01T02:21:00.000-07:00</published><updated>2009-04-01T05:16:08.081-07:00</updated><title type='text'>Performing Database Maintenance</title><content type='html'>MySQL features a series of statements that can (and should) be used to ensure that databases are correct and functioning properly. &lt;br /&gt;Here are some statements you should be aware of: &lt;br /&gt;&lt;br /&gt;ANALYZE TABLE is used to check that table keys are correct. ANALYZE TABLE returns status information, as seen here:&lt;br /&gt;• Input &lt;br /&gt;ANALYZE TABLE orders;&lt;br /&gt;&lt;br /&gt;• Output &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_nF2AQDhdiZc/SdNaV5Sd-CI/AAAAAAAAA_k/2N-AWu2NgOM/s1600-h/snapshot36.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 61px;" src="http://2.bp.blogspot.com/_nF2AQDhdiZc/SdNaV5Sd-CI/AAAAAAAAA_k/2N-AWu2NgOM/s320/snapshot36.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5319694917056722978" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;CHECK TABLE is used to check tables for a variety of problems. Indexes are also checked on a MyISAM table. CHECK TABLE supports a series of modes for use with MyISAM tables. CHANGED checks tables that have changed since the last check, EXTENDED performs the most thorough check, FAST only checks tables that were not closed properly, MEDIUM checks all deleted links and performs key verification, and QUICK performs a quick scan only. As seen here, CHECK TABLE found and repaired a problem:&lt;br /&gt;• Input &lt;br /&gt;CHECK TABLE orders, orderitems;&lt;br /&gt;&lt;br /&gt;• Output &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_nF2AQDhdiZc/SdNanDr_khI/AAAAAAAAA_s/6JBWPO4Cu74/s1600-h/snapshot37.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 82px;" src="http://1.bp.blogspot.com/_nF2AQDhdiZc/SdNanDr_khI/AAAAAAAAA_s/6JBWPO4Cu74/s320/snapshot37.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5319695211905913362" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If MyISAM table access produces incorrect and inconsistent results, you might need to repair the table using REPAIR TABLE. This statement should not be used frequently, and if regular use is required, there is likely a far bigger problem that needs addressing.&lt;br /&gt;&lt;br /&gt;If you delete large amounts of data from a table, OPTIMIZE TABLE should be used to reclaim previously used space, thus optimizing the performance of the table.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;source Ben forta&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-2496104484379901387?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/2496104484379901387/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=2496104484379901387' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/2496104484379901387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/2496104484379901387'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/performing-database-maintenance.html' title='Performing Database Maintenance'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_nF2AQDhdiZc/SdNaV5Sd-CI/AAAAAAAAA_k/2N-AWu2NgOM/s72-c/snapshot36.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-7391373228264534695</id><published>2009-04-01T02:04:00.000-07:00</published><updated>2009-04-01T02:05:02.181-07:00</updated><title type='text'>How to run a single host command without exiting mysql ?</title><content type='html'>use the \! command. The following example runs the system command pwd on a UNIX/Linux system to determine the path of the current working directory: &lt;br /&gt;&lt;br /&gt;mysql&gt; \! pwd &lt;br /&gt;/home/chris/public_html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-7391373228264534695?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/7391373228264534695/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=7391373228264534695' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/7391373228264534695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/7391373228264534695'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/how-to-run-single-host-command-without.html' title='How to run a single host command without exiting mysql ?'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-5716940086801508754</id><published>2009-04-01T02:03:00.000-07:00</published><updated>2009-04-01T02:04:09.508-07:00</updated><title type='text'>Capturing Output from MySQL</title><content type='html'>If you want to divert the output of a SQL query to a log file, use the \T command along with a filename. For instance, to write the output of a query to query.txt, do the following: &lt;br /&gt;&lt;br /&gt;mysql&gt; \T output.txt &lt;br /&gt;Logging to file 'query.txt'&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-5716940086801508754?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/5716940086801508754/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=5716940086801508754' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/5716940086801508754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/5716940086801508754'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/capturing-output-from-mysql.html' title='Capturing Output from MySQL'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-5758620242518536660</id><published>2009-04-01T02:01:00.000-07:00</published><updated>2009-04-01T02:03:03.349-07:00</updated><title type='text'>how to show connection status  in mysql?</title><content type='html'>The \s command returns the status of the current database connection, including the current database name and the connection parameters. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;mysql&gt; \s;&lt;br /&gt;--------------&lt;br /&gt;mysql  Ver 14.12 Distrib 5.0.51a, for debian-linux-gnu (i486) using readline 5.2&lt;br /&gt;&lt;br /&gt;Connection id:  10&lt;br /&gt;Current database: test&lt;br /&gt;Current user:  root@localhost&lt;br /&gt;SSL:   Not in use&lt;br /&gt;Current pager:  stdout&lt;br /&gt;Using outfile:  ''&lt;br /&gt;Using delimiter: ;&lt;br /&gt;Server version:  5.0.51a-3ubuntu5.1 (Ubuntu)&lt;br /&gt;Protocol version: 10&lt;br /&gt;Connection:  Localhost via UNIX socket&lt;br /&gt;Server characterset: latin1&lt;br /&gt;Db     characterset: latin1&lt;br /&gt;Client characterset: latin1&lt;br /&gt;Conn.  characterset: latin1&lt;br /&gt;UNIX socket:  /var/run/mysqld/mysqld.sock&lt;br /&gt;Uptime:   4 hours 1 min 39 sec&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-5758620242518536660?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/5758620242518536660/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=5758620242518536660' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/5758620242518536660'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/5758620242518536660'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/how-to-show-connection-status-in-mysql.html' title='how to show connection status  in mysql?'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-7142239481768169805</id><published>2009-04-01T00:35:00.000-07:00</published><updated>2009-04-01T00:37:29.421-07:00</updated><title type='text'>System-Related Functions in mysql</title><content type='html'>CURRENT_USER(), SESSION_USER(), SYSTEM_USER(),and USER() Functions&lt;br /&gt;&lt;br /&gt;The CURRENT_USER(), SESSION_USER(), SYSTEM_USER(), and USER() functions all return the username and the hostname under which the current session is authenticated. In each case, the functions take no arguments. For example, the syntax for the USER() function is as follows:&lt;br /&gt;&lt;br /&gt;USER()&lt;br /&gt; &lt;br /&gt;You can use the functions in any SELECT statement to return the username and hostname, as shown in the following example: SELECT USER();&lt;br /&gt; &lt;br /&gt;The value returned by these functions is in the form of &lt;username&gt;@&lt;hostname&gt;, such as root@localhost. &lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt;Note that, under some circumstances, the CURRENT_USER() function can sometimes return a value different from the other three functions. For example, if a client specifies a username, but the client is authenticated anonymously, a difference can occur. For more information about these functions, see the&lt;br /&gt;MySQL product documentation.&lt;br /&gt;&lt;br /&gt;   &lt;br /&gt;&lt;br /&gt;  How to get current connection id in mysql?&lt;br /&gt;  &lt;br /&gt;  SELECT CONNECTION_ID();&lt;br /&gt;  &lt;br /&gt;  How to retrieve the last value that was inserted in an AUTO_INCREMENT column (in mysql) ?.&lt;br /&gt;&lt;br /&gt;  SELECT LAST_INSERT_ID();&lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt;  how get information on global variables ?&lt;br /&gt;  &lt;br /&gt;  SHOW GLOBAL VARIABLES;&lt;br /&gt;  &lt;br /&gt;  How to use the SHOW VARIABLES Statement to Retrieve Server System Variable Settings ?&lt;br /&gt;  &lt;br /&gt;  SHOW [GLOBAL | SESSION] VARIABLES [LIKE ‘&lt; value &gt;’]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-7142239481768169805?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/7142239481768169805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=7142239481768169805' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/7142239481768169805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/7142239481768169805'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/system-related-functions.html' title='System-Related Functions in mysql'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-7979078931575501878</id><published>2009-04-01T00:09:00.001-07:00</published><updated>2009-04-01T22:24:35.301-07:00</updated><title type='text'>how to lock and unlock tables in mysql</title><content type='html'>To lock a table in a MySQL database, you should use the LOCK TABLES statement, as shown in the following&lt;br /&gt;&lt;br /&gt;  syntax:&lt;br /&gt;  &lt;br /&gt;     LOCK {TABLE | TABLES}&lt;br /&gt;     &lt; table name &gt; [AS &lt; alias &gt;] {READ [LOCAL] | [LOW_PRIORITY] WRITE}&lt;br /&gt;     [{, &lt; table name &gt; [AS &lt; alias &gt;] {READ [LOCAL] | [LOW_PRIORITY] WRITE}}...]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;you must specify a READ lock type or a WRITE lock type. If you specify READ, any connection can read from the table, but no connection can write to the table&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you specify READ LOCAL, nonconflicting INSERT statements can be executed by any connection&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;If you specify WRITE, the current connection can read or write to the table, but no other connections can access the table until the lock has been removed.&lt;/span&gt; If you specify LOW_PRIORITY WRITE, other connections can obtain READ locks while the current session is waiting for the WRITE lock.&lt;br /&gt;&lt;br /&gt;Once you lock a table, it remains locked until you explicitly unlock the table with the UNLOCK TABLES statement (described in the text that follows) or end your current session.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; Ex:-  LOCK TABLE Books READ; &lt;br /&gt;        (places a lock on the Books table)&lt;br /&gt;       &lt;br /&gt;LOCK TABLES Books READ, BookOrders WRITE;                                                                  &lt;br /&gt;       (places locks on the Books and BookOrders tables:)&lt;br /&gt;       &lt;br /&gt;  &lt;br /&gt;  The UNLOCK TABLES Statement&lt;br /&gt;  ----------------------------&lt;br /&gt;  &lt;br /&gt;  To unlock one or more locked tables, you must use the UNLOCK TABLES statement, shown in the following syntax:&lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;UNLOCK {TABLE | TABLES}&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt;As you can see, you must specify the UNLOCK keyword along with the TABLE or TABLES keyword. As with the LOCK TABLES statement, the TABLE and TABLES keywords are synonymous, which means that you can use either one, regardless of the number of tables that you’re unlocking.&lt;br /&gt;  &lt;br /&gt;One thing to notice about the UNLOCK TABLES statement is that no table names are specified. When you use this statement, all tables that have been locked from within the current session are unlocked. &lt;br /&gt;&lt;br /&gt;For example, to unlock the Books and BookOrders tables, you would use a statement similar to the following:&lt;br /&gt; UNLOCK TABLES;&lt;br /&gt;&lt;br /&gt;If only one table is locked, you can still use this statement, although you can also use the TABLE keyword,rather than TABLES. Either way, any locked tables are now unlocked.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Locking Your Nontransactional Tables&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Follow these steps to complete this exercise:&lt;br /&gt;&lt;br /&gt;1.&lt;br /&gt;&lt;br /&gt;Open the mysql client utility, type the following command, and press Enter:&lt;br /&gt;use test&lt;br /&gt;You should receive a message indicating that you switched to the test database.&lt;br /&gt;&lt;br /&gt;2.&lt;br /&gt;&lt;br /&gt;To demonstrate how to lock a table, you should first create the table in the test database. Execute the following SQL statement at the mysql command prompt:&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;CREATE TABLE t1 (ID INT NOT NULL);&lt;/span&gt;&lt;br /&gt;You should receive a message indicating that the statement executed successfully and that the statement affected no rows.&lt;br /&gt;&lt;br /&gt;3.&lt;br /&gt;&lt;br /&gt;Now you can specify a READ lock on the t1 table. Execute the following SQL statement at the mysql command prompt:&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;LOCK TABLE t1 READ;&lt;/span&gt;&lt;br /&gt;You should receive a message indicating that the statement executed successfully, affecting no rows.&lt;br /&gt;&lt;br /&gt;4. &lt;br /&gt;&lt;br /&gt;Next, you should try to insert a row in the t1 table to demonstrate that placing a READ lock prevents you from adding data to the table. Execute the following SQL statement at the mysql command prompt:&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;INSERT INTO t1 VALUES (101);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You should receive a message indicating that the table has been locked with a READ lock and cannot be updated.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5.&lt;br /&gt;&lt;br /&gt;Now you can specify a WRITE lock on the t1 table. Execute the following SQL statement at the mysql command prompt:&lt;br /&gt;&lt;span style="font-weight:bold;"&gt; LOCK TABLE t1 WRITE;&lt;/span&gt;&lt;br /&gt;You should receive a message indicating that the statement executed successfully and that the statement affected no rows.&lt;br /&gt;     &lt;br /&gt;     &lt;br /&gt;6.&lt;br /&gt;&lt;br /&gt;Next, you should insert a row in the t1 table to demonstrate that placing a WRITE lock does not prevent you from adding data to the table. Execute   the following SQL statement at the mysql command prompt:&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;INSERT INTO t1 VALUES (101);&lt;/span&gt;&lt;br /&gt;You should receive a message indicating that the statement executed successfully, affecting one row.&lt;br /&gt;&lt;br /&gt;7.&lt;br /&gt;&lt;br /&gt;Now you should unlock the table. Execute the following SQL statement at the mysql command prompt:&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;UNLOCK TABLES;&lt;/span&gt;&lt;br /&gt;You should receive a message indicating that the statement has executed successfully and that the statement affected no rows.&lt;br /&gt;&lt;br /&gt;8.&lt;br /&gt;&lt;br /&gt;Finally, you should remove the table from the test database. Execute the following SQL statement at the mysql command prompt:&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;DROP TABLE t1;&lt;/span&gt;&lt;br /&gt;You should receive a message indicating that the statement executed successfully, affecting no rows.&lt;br /&gt;&lt;br /&gt;source:- &lt;span style="font-weight:bold;"&gt;robert sheldon &amp; geoff moes&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-7979078931575501878?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/7979078931575501878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=7979078931575501878' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/7979078931575501878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/7979078931575501878'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/04/how-to-lock-and-unlock-tables-in-mysql.html' title='how to lock and unlock tables in mysql'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-6196444931521994113</id><published>2009-03-29T04:44:00.001-07:00</published><updated>2009-03-29T04:44:48.994-07:00</updated><title type='text'>mysql database</title><content type='html'>there is a database named mysql in which all the information about users and their privileges are stored.&lt;br /&gt;&lt;br /&gt;table in mysql &lt;br /&gt;&lt;br /&gt;db                      database specific privileges&lt;br /&gt;host&lt;br /&gt;user                     for global privileges&lt;br /&gt;columns_priv         &lt;br /&gt;tables_priv              table specific privileges&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;select user,db from db;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-6196444931521994113?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/6196444931521994113/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=6196444931521994113' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/6196444931521994113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/6196444931521994113'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/03/mysql-database.html' title='mysql database'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-8722783739614202159</id><published>2009-03-29T04:42:00.001-07:00</published><updated>2009-03-29T04:42:35.169-07:00</updated><title type='text'>Regular expression examples</title><content type='html'>Regular expressions:-&lt;br /&gt;&lt;br /&gt; select 'hello' regexp 'e';&lt;br /&gt; select 'hello' regexp '^e';       /*beginning*/&lt;br /&gt;select 'hello' regexp 'o$'&lt;br /&gt;select 'hello' regexp '^hello$'&lt;br /&gt;select 'hello' regexp '^h...o$'&lt;br /&gt;select 'hed3rd3r34edwecfo' regexp '^h.+o$'   /*  +  means one or more characters */&lt;br /&gt;select 'hssso' regexp 'hs{3}o$ '&lt;br /&gt;select 'hssso' regexp 'hs{3,10}o$ '&lt;br /&gt;select 'hello' regexp '^h[el]+o$ '&lt;br /&gt;select 'hello' regexp '^h[el]*o$ '&lt;br /&gt;select 'hello' regexp '^h[el]{3}o$ '&lt;br /&gt;select 'hello' regexp '^h[el]{3,5}o$ '&lt;br /&gt;select 'fnefnefeklfefhehdvgwcsgv'  regexp '^[a-z]+$'&lt;br /&gt;select 'fnefnefeklfefhehdvgwcsgv'  regexp '^[^m]+$'    /* ^ within [] means match any character apart from that follows it*/&lt;br /&gt;'aarklon@gmail.com'  regexp '^[A-Za-z0-9_]+@[A-Za-z0-9\-]+\.[A-Za-z0-9.\-]+$'&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ex:- select name from recipes where name regexp 'veg|carrot|cabbage' and not regexp 'coconut';&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-8722783739614202159?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/8722783739614202159/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=8722783739614202159' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/8722783739614202159'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/8722783739614202159'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/03/regular-expression-examples.html' title='Regular expression examples'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-1212947533274570718</id><published>2009-03-26T04:50:00.000-07:00</published><updated>2009-03-26T04:51:22.653-07:00</updated><title type='text'>Host 'host_name' is blocked</title><content type='html'>If you get the following error, it means that mysqld has received many connect requests from the host 'host_name' that have been interrupted in the middle:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;span style="font-style:italic;"&gt;Host 'host_name' is blocked because of many connection errors.Unblock with 'mysqladmin flush-hosts&lt;/span&gt;'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The number of interrupted connect requests allowed is determined by the value of the max_connect_errors system variable. After max_connect_errors failed requests, mysqld assumes that something is wrong (for example, that someone is trying to break in), and blocks the host from further connections until you execute a mysqladmin flush-hosts command or issue a FLUSH HOSTS statement. See Section 5.1.3, “Server System Variables”.&lt;br /&gt;&lt;br /&gt;By default, mysqld blocks a host after 10 connection errors. You can adjust the value by starting the server like this:&lt;br /&gt;&lt;br /&gt;shell&gt; mysqld_safe --max_connect_errors=10000 &amp;&lt;br /&gt;&lt;br /&gt;If you get this error message for a given host, you should first verify that there isn't anything wrong with TCP/IP connections from that host. If you are having network problems, it does you no good to increase the value of the max_connect_errors variable.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-1212947533274570718?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/1212947533274570718/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=1212947533274570718' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/1212947533274570718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/1212947533274570718'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/03/host-hostname-is-blocked.html' title='Host &apos;host_name&apos; is blocked'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-4346303826040210707</id><published>2009-03-22T08:44:00.000-07:00</published><updated>2009-03-22T08:46:07.069-07:00</updated><title type='text'>How to get the list of database engines available under mysql ?</title><content type='html'>soln:- &lt;span style="font-weight:bold;"&gt;use the command SHOW ENGINES or show table types;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-4346303826040210707?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/4346303826040210707/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=4346303826040210707' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/4346303826040210707'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/4346303826040210707'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/03/how-to-get-list-of-database-engines.html' title='How to get the list of database engines available under mysql ?'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-343073429369694692</id><published>2009-03-01T07:54:00.001-08:00</published><updated>2009-03-01T07:54:56.462-08:00</updated><title type='text'>access-denied-for-user-rootlocalhost</title><content type='html'>If you are getting access-denied-for-user-rootlocalhost messege while accessing mysql from the shell then make sure that you have done&lt;br /&gt;&lt;br /&gt;su -&lt;br /&gt;&lt;br /&gt;from the command prompt after that fire mysql even if you are getting that error messege then you need to reset the mysql password you can use following steps for it&lt;br /&gt;&lt;br /&gt;first locate your mysql’s hostname.pid file then&lt;br /&gt;&lt;br /&gt;kill `cat /mysql-data-directory/host_name.pid`&lt;br /&gt;mysqld_safe –skip-grant-tables &amp;&lt;br /&gt;mysqladmin -u root flush-privileges password “newpassword”&lt;br /&gt;&lt;br /&gt;New password will be the password that you want to set now.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;NB:- warning untested &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-343073429369694692?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/343073429369694692/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=343073429369694692' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/343073429369694692'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/343073429369694692'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/03/access-denied-for-user-rootlocalhost.html' title='access-denied-for-user-rootlocalhost'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-4312361265428411451</id><published>2009-03-01T07:52:00.000-08:00</published><updated>2009-03-01T07:53:13.452-08:00</updated><title type='text'>MySQL Change root Password</title><content type='html'>Posted By vivek On January 2, 2006 @ 11:17 pm In AIX, BASH Shell, CentOS, Debian / Ubuntu, FreeBSD, HP-UX Unix, Linux, MySQL, Solaris-Unix, Suse, UNIX, Ubuntu Linux | 15 Comments&lt;br /&gt;&lt;br /&gt;Q. How do I change MySQL root password under Linux, FreeBSD, OpenBSD and UNIX like operating system over ssh / telnet session?&lt;br /&gt;&lt;br /&gt;A. Setting up mysql password is one of the essential tasks. root user is MySQL admin account. Please note that Linux / UNIX login root account for your operating system and MySQL root are different. They are separate and nothing to do with each other (indeed some admin removes root account and setup admin as mysql super user).&lt;br /&gt;mysqladmin command to change root password&lt;br /&gt;&lt;br /&gt;If you have never set a root password for MySQL, the server does not require a password at all for connecting as root. To setup root password for first time, use mysqladmin command at shell prompt as follows:&lt;br /&gt;&lt;br /&gt;$ mysqladmin -u root password NEWPASSWORD&lt;br /&gt;&lt;br /&gt;However, if you want to change (or update) a root password, then you need to use following command&lt;br /&gt;&lt;br /&gt;$ mysqladmin -u root -p oldpassword newpass&lt;br /&gt;&lt;br /&gt;Enter password:&lt;br /&gt;Change MySQL password for other user&lt;br /&gt;&lt;br /&gt;To change a normal user password you need to type (let us assume you would like to change password for vivek):&lt;br /&gt;&lt;br /&gt;$ mysqladmin -u vivek -p oldpassword newpass&lt;br /&gt;&lt;br /&gt;Changing MySQL root user password using mysql sql command&lt;br /&gt;&lt;br /&gt;This is another method. MySQL stores username and passwords in user table inside MySQL database. You can directly update password using the following method to update or change password for user vivek:&lt;br /&gt;&lt;br /&gt;1) Login to mysql server, type following command at shell prompt:&lt;br /&gt;&lt;br /&gt;$ mysql -u root -p&lt;br /&gt;&lt;br /&gt;2) Use mysql database (type command at mysql&gt; prompt):&lt;br /&gt;&lt;br /&gt;mysql&gt; use mysql;&lt;br /&gt;&lt;br /&gt;3) Change password for user vivek:&lt;br /&gt;&lt;br /&gt;mysql&gt; update user set password=PASSWORD("NEWPASSWORD") where User='vivek';&lt;br /&gt;&lt;br /&gt;4) Reload privileges:&lt;br /&gt;&lt;br /&gt;mysql&gt; flush privileges;&lt;br /&gt;mysql&gt; quit&lt;br /&gt;&lt;br /&gt;This method you need to use while using PHP or Perl scripting.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;URL to article: http://www.cyberciti.biz/faq/mysql-change-root-password/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-4312361265428411451?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/4312361265428411451/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=4312361265428411451' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/4312361265428411451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/4312361265428411451'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/03/mysql-change-root-password.html' title='MySQL Change root Password'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-4215703526927258003</id><published>2009-03-01T07:47:00.000-08:00</published><updated>2009-03-01T07:48:05.333-08:00</updated><title type='text'>Recover MySQL root password</title><content type='html'>Recover MySQL root password&lt;br /&gt;&lt;br /&gt;Posted By nixcraft On April 18, 2006 @ 4:18 pm In Debian Linux, Linux, MySQL, OpenBSD, RedHat/Fedora Linux, Solaris, Suse Linux, Tips, Troubleshooting, UNIX, Ubuntu Linux | 59 Comments&lt;br /&gt;&lt;br /&gt;You can recover MySQL database server password with following five easy steps.&lt;br /&gt;&lt;br /&gt;Step # 1: Stop the MySQL server process.&lt;br /&gt;&lt;br /&gt;Step # 2: Start the MySQL (mysqld) server/daemon process with the --skip-grant-tables option so that it will not prompt for password&lt;br /&gt;&lt;br /&gt;Step # 3: Connect to mysql server as the root user&lt;br /&gt;&lt;br /&gt;Step # 4: Setup new root password&lt;br /&gt;&lt;br /&gt;Step # 5: Exit and restart MySQL server&lt;br /&gt;&lt;br /&gt;Here are commands you need to type for each step (login as the root user):&lt;br /&gt;Step # 1 : [1] Stop mysql service&lt;br /&gt;&lt;br /&gt;# /etc/init.d/mysql stop&lt;br /&gt;Output:&lt;br /&gt;&lt;br /&gt;Stopping MySQL database server: mysqld.&lt;br /&gt;&lt;br /&gt;Step # 2: Start to MySQL server w/o password:&lt;br /&gt;&lt;br /&gt;# mysqld_safe --skip-grant-tables &amp;&lt;br /&gt;Output:&lt;br /&gt;&lt;br /&gt;[1] 5988&lt;br /&gt;Starting mysqld daemon with databases from /var/lib/mysql&lt;br /&gt;mysqld_safe[6025]: started&lt;br /&gt;&lt;br /&gt;Step # 3: Connect to mysql server using mysql client:&lt;br /&gt;&lt;br /&gt;# mysql -u root&lt;br /&gt;Output:&lt;br /&gt;&lt;br /&gt;Welcome to the MySQL monitor.  Commands end with ; or \g.&lt;br /&gt;Your MySQL connection id is 1 to server version: 4.1.15-Debian_1-log&lt;br /&gt;&lt;br /&gt;Type 'help;' or '\h' for help. Type '\c' to clear the buffer.&lt;br /&gt;&lt;br /&gt;mysql&gt;&lt;br /&gt;&lt;br /&gt;Step # 4: [2] Setup new MySQL root user password&lt;br /&gt;&lt;br /&gt;mysql&gt; use mysql;&lt;br /&gt;mysql&gt; update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root';&lt;br /&gt;mysql&gt; flush privileges;&lt;br /&gt;mysql&gt; quit&lt;br /&gt;Step # 5: Stop MySQL Server:&lt;br /&gt;&lt;br /&gt;# /etc/init.d/mysql stop&lt;br /&gt;Output:&lt;br /&gt;&lt;br /&gt;Stopping MySQL database server: mysqld&lt;br /&gt;STOPPING server from pid file /var/run/mysqld/mysqld.pid&lt;br /&gt;mysqld_safe[6186]: ended&lt;br /&gt;&lt;br /&gt;[1]+  Done                    mysqld_safe --skip-grant-tables&lt;br /&gt;&lt;br /&gt;Step # 6: [3] Start MySQL server and test it&lt;br /&gt;&lt;br /&gt;# /etc/init.d/mysql start&lt;br /&gt;# mysql -u root -p&lt;br /&gt;&lt;br /&gt;Article printed from nixCraft: http://www.cyberciti.biz/tips&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Warning: untested&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-4215703526927258003?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/4215703526927258003/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=4215703526927258003' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/4215703526927258003'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/4215703526927258003'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/03/recover-mysql-root-password.html' title='Recover MySQL root password'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-7423458476338453112</id><published>2009-03-01T07:46:00.001-08:00</published><updated>2009-03-01T08:12:31.132-08:00</updated><title type='text'>mysql backup &amp; restore</title><content type='html'>&lt;span style="font-weight:bold;"&gt;backup&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;mysqldump -u root -p --all-databases &gt; mybackupfile.dump&lt;br /&gt;&lt;br /&gt;or&lt;br /&gt;&lt;br /&gt;mysqldump -u root -p --all-databases | gzip &gt; /tmp/mysql.dump.gz&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Restore using mysql&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you have to re-build your database from scratch, you can easily restore the mysqldump file by using the mysql command. This method is usually used to recreate or rebuild the database from scratch.&lt;br /&gt;&lt;br /&gt;Here's how you would restore your custback.sql file to the Customers database.&lt;br /&gt;&lt;br /&gt;    mysql -u sadmin -p pass21 Customers &lt; custback.sql &lt;br /&gt;&lt;br /&gt;Easy isn't it ? Here's the general format you would follow:&lt;br /&gt;&lt;br /&gt;    mysql -u [username] -p [password] [database_to_restore] &lt; [backupfile] &lt;br /&gt;&lt;br /&gt;Now how about those zipped files? You can restore your zipped backup files by first uncompressing its contents and then sending it to mysql.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;raw fast and easy offline back up method&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1 stop the mysql server&lt;br /&gt; &lt;span style="font-weight:bold;"&gt; /etc/init.d/mysqld stop&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2 copy mysqls data files and directories. ex if your mysql data directory is /var.lib/mysql and you want to save it to /tmp/mysql-backup&lt;br /&gt;&lt;br /&gt; &lt;span style="font-weight:bold;"&gt;cp -r   /var/lib/mysql /tmp/mysql-backup&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;instead of cp you can use rsync,tar,gzip..etc&lt;br /&gt;&lt;br /&gt;3 start the server again&lt;br /&gt;&lt;br /&gt; &lt;span style="font-weight:bold;"&gt; /etc/init.d/mysqld start&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-7423458476338453112?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/7423458476338453112/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=7423458476338453112' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/7423458476338453112'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/7423458476338453112'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/03/mysql-backup-restore.html' title='mysql backup &amp; restore'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-6238762138147436741</id><published>2009-02-13T03:44:00.000-08:00</published><updated>2009-02-13T03:46:45.422-08:00</updated><title type='text'>Viewing a users privileges</title><content type='html'>SHOW GRANTS; &lt;br /&gt;  SHOW GRANTS FOR user; &lt;br /&gt;  &lt;br /&gt;  ex:-&lt;br /&gt;  &lt;br /&gt;  SHOW GRANTS FOR 'siju'@'localhost'; &lt;br /&gt;+----------------------------------------------------------------------------------------------------------------------------------------+&lt;br /&gt;| Grants for siju@localhost                                                                                                              |&lt;br /&gt;+----------------------------------------------------------------------------------------------------------------------------------------+&lt;br /&gt;| GRANT ALL PRIVILEGES ON *.* TO 'siju'@'localhost' IDENTIFIED BY PASSWORD '*E0276DB476A226D16E63FCD535DC176528FA57D4' WITH GRANT OPTION | &lt;br /&gt;+----------------------------------------------------------------------------------------------------------------------------------------+&lt;br /&gt;1 row in set (0.00 sec)&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt; Issuing SHOW GRANTS with no FOR clause shows the privileges for the current user. It is equivalent to &lt;br /&gt;&lt;br /&gt;SHOW GRANTS FOR CURRENT_USER();&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-6238762138147436741?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/6238762138147436741/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=6238762138147436741' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/6238762138147436741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/6238762138147436741'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/02/viewing-users-privileges.html' title='Viewing a users privileges'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-6322824024221700598</id><published>2009-02-13T03:38:00.000-08:00</published><updated>2009-02-13T03:39:01.027-08:00</updated><title type='text'>Setting passwords in Mysql</title><content type='html'>SET PASSWORD = PASSWORD('password'); &lt;br /&gt;SET PASSWORD FOR user@host = PASSWORD('password'); &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;When you are connected to MySQL as a regular user, use the first syntax to change your own password. If you connected as an administrator, you can change the password for another user as follows&lt;/span&gt;: &lt;br /&gt;&lt;br /&gt;SET PASSWORD FOR zak@localhost = &lt;br /&gt;    PASSWORD('flibble'); &lt;br /&gt;&lt;br /&gt;In fact to change another user's password you must have the UPDATE privilege on the mysql.user table. The SET PASSWORD command is available in all versions of MySQL, but you can also modify passwords by changing values in the user table. The previous command is equivalent to the following UPDATE statement: &lt;br /&gt;&lt;br /&gt;UPDATE user &lt;br /&gt;SET Password = PASSWORD('flibble') &lt;br /&gt;WHERE User = 'zak' AND Host = 'localhost'; &lt;br /&gt;&lt;br /&gt;Remember, you must issue a FLUSH PRIVILEGES command after making any changes to the user table. This is not required if you use the SET PASSWORD command.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-6322824024221700598?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/6322824024221700598/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=6322824024221700598' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/6322824024221700598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/6322824024221700598'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/02/setting-passwords-in-mysql.html' title='Setting passwords in Mysql'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-3281670307523258095</id><published>2009-02-12T03:52:00.001-08:00</published><updated>2009-02-12T22:46:30.409-08:00</updated><title type='text'>myisamchk utility</title><content type='html'>The myisamchk utility is designed to check and repair any data tables using the default MYISAM table format natively supported by mysql.&lt;br /&gt;normally, myisamchk should be run as the mysql user created at installation from the directory in which the tables reside.inorder to check a database, do su mysql, change into the directory name corresponding the name of the database , and run myisamchk with one or more options suggested below&lt;br /&gt;&lt;br /&gt;  Ex:- myisamchk -e -r *.MYI&lt;br /&gt;  &lt;br /&gt;  -c check the table for errors&lt;br /&gt;  -e perform an extended check&lt;br /&gt;  -r recover/correct errors found&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;How To Repair Corrupted MySQL Tables Using myisamchk ?&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;   myisamchk /var/lib/mysql/*/*.MYI &gt;&gt; /tmp/myisamchk_log.txt&lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt;   myisamchk: warning: 1 client is using or hasn't closed the table properly&lt;br /&gt;   MyISAM-table '/var/lib/mysql/mysql/user.MYI' is usable but should be fixed&lt;br /&gt;   &lt;br /&gt;   &lt;br /&gt;    sudo myisamchk -r /var/lib/mysql/mysql/user.MYI&lt;br /&gt;&lt;br /&gt;    - recovering (with sort) MyISAM-table '/var/lib/mysql/mysql/user.MYI'&lt;br /&gt;      Data records: 7&lt;br /&gt;      - Fixing index 1&lt;br /&gt;      &lt;br /&gt;      &lt;br /&gt;You may get error message: clients are using or haven’t closed the table properly, if the tables are still getting used by your application and other tables. To avoid this error message, shutdown mysqld before performing the repair, if you can afford to shutdown the DB for a while. If not, use FLUSH TABLES to force mysqld to flush any table modification that are still in memory.&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt; &lt;span style="font-weight:bold;"&gt;How to use myisamchk to get  information about a table ?&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;  sudo myisamchk -dvv /var/lib/mysql/mysql/user.MYI&lt;br /&gt;&lt;br /&gt;MyISAM file:         /var/lib/mysql/mysql/user.MYI&lt;br /&gt;Record format:       Packed&lt;br /&gt;Character set:       latin1_swedish_ci (8)&lt;br /&gt;File-version:        1&lt;br /&gt;Creation time:       2008-10-28  6:51:38&lt;br /&gt;Recover time:        2009-02-13  6:34:10&lt;br /&gt;Status:              checked,optimized keys&lt;br /&gt;Data records:                    7  Deleted blocks:                 0&lt;br /&gt;Datafile parts:                  7  Deleted data:                   0&lt;br /&gt;Datafile pointer (bytes):        6  Keyfile pointer (bytes):        6&lt;br /&gt;Datafile length:               536  Keyfile length:              2048&lt;br /&gt;Max datafile length: 281474976710654  Max keyfile length: 288230376151710719&lt;br /&gt;Recordlength:                  344&lt;br /&gt;&lt;br /&gt;table description:&lt;br /&gt;Key Start Len Index   Type                     Rec/key         Root  Blocksize&lt;br /&gt;1   1     180 unique  char packed stripped           0         1024       1024&lt;br /&gt;    181   48          char stripped                  0&lt;br /&gt;&lt;br /&gt;Field Start Length Nullpos Nullbit Type&lt;br /&gt;1     1     180                    no endspace                        &lt;br /&gt;2     181   48                     no endspace                        &lt;br /&gt;3     229   41                     no endspace                        &lt;br /&gt;4     270   1                                                         &lt;br /&gt;5     271   1                                                         &lt;br /&gt;6     272   1                                                         &lt;br /&gt;7     273   1                                                         &lt;br /&gt;8     274   1                                                         &lt;br /&gt;9     275   1                                                         &lt;br /&gt;10    276   1                                                         &lt;br /&gt;11    277   1                                                         &lt;br /&gt;12    278   1                                                         &lt;br /&gt;13    279   1                                                         &lt;br /&gt;14    280   1                                                         &lt;br /&gt;15    281   1                                                         &lt;br /&gt;16    282   1                                                         &lt;br /&gt;17    283   1                                                         &lt;br /&gt;18    284   1                                                         &lt;br /&gt;19    285   1                                                         &lt;br /&gt;20    286   1                                                         &lt;br /&gt;21    287   1                                                         &lt;br /&gt;22    288   1                                                         &lt;br /&gt;23    289   1                                                         &lt;br /&gt;24    290   1                                                         &lt;br /&gt;25    291   1                                                         &lt;br /&gt;26    292   1                                                         &lt;br /&gt;27    293   1                                                         &lt;br /&gt;28    294   1                                                         &lt;br /&gt;29    295   1                                                         &lt;br /&gt;30    296   1                                                         &lt;br /&gt;31    297   10                     blob                               &lt;br /&gt;32    307   10                     blob                               &lt;br /&gt;33    317   10                     blob                               &lt;br /&gt;34    327   4                      no zeros                           &lt;br /&gt;35    331   4                      no zeros                           &lt;br /&gt;36    335   4                      no zeros                           &lt;br /&gt;37    339   4                      no zeros       &lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;All myisamchk options ?&lt;/span&gt;&lt;br /&gt;   &lt;br /&gt;   myisamchk --help&lt;br /&gt;   &lt;br /&gt;&lt;br /&gt;source:- http://www.thegeekstuff.com/2008/09/how-to-repair-corrupted-mysql-tables-using-myisamchk/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-3281670307523258095?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/3281670307523258095/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=3281670307523258095' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/3281670307523258095'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/3281670307523258095'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/02/myisamchk-utility.html' title='myisamchk utility'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-6514850614515255443</id><published>2009-02-12T03:49:00.001-08:00</published><updated>2009-02-12T22:26:32.800-08:00</updated><title type='text'>mysqladmin utility</title><content type='html'>This utility is the principal tool for quick mysql database administration. in addition to the usual parameters, the following commands are supported.&lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt;  create &lt;database_name&gt; &lt;br /&gt;  drop &lt;database_name&gt;&lt;br /&gt;  password &lt;new_password&gt;&lt;br /&gt;  &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;reload&lt;/span&gt;     reload the grant tables that control permissions&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;status&lt;/span&gt;     provide the status of the server&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;shutdown&lt;/span&gt;   shut down the server&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;variables&lt;/span&gt;  &lt;br /&gt;&lt;br /&gt;  show the variables that control mysql operation and their current values&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;version&lt;/span&gt;    &lt;br /&gt;               &lt;br /&gt;   provide the version number of the server and how long it has been running&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style="font-weight:bold;"&gt;EXAMPLES&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt; How to display all MySQL server system variables and the values?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   mysqladmin  -u root -p variables&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;   &lt;span style="font-weight:bold;"&gt;How to display all the running process/queries in the mysql database?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   mysqladmin -u root -p processlist&lt;br /&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt; How to create a MySQL Database?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   mysqladmin -u root -p create databasename&lt;br /&gt;&lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;How to check mysql server is up and running ?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  mysqladmin -u root -p ping&lt;br /&gt;  Enter password:&lt;br /&gt;  mysqld is alive&lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt; &lt;span style="font-weight:bold;"&gt; How do I find out what version of MySQL I am running?&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;  mysqladmin -u root -p version&lt;br /&gt;  Enter password: &lt;br /&gt;&lt;br /&gt;mysqladmin  Ver 8.41 Distrib 5.0.51a, for debian-linux-gnu on i486&lt;br /&gt;Copyright (C) 2000-2006 MySQL AB&lt;br /&gt;This software comes with ABSOLUTELY NO WARRANTY. This is free software,&lt;br /&gt;and you are welcome to modify and redistribute it under the GPL license&lt;br /&gt;&lt;br /&gt;Server version  5.0.51a-3ubuntu5.1&lt;br /&gt;Protocol version 10&lt;br /&gt;Connection  Localhost via UNIX socket&lt;br /&gt;UNIX socket  /var/run/mysqld/mysqld.sock&lt;br /&gt;Uptime:   1 hour 38 min 43 sec&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style="font-weight:bold;"&gt;What is the current status of MySQL server?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; user@ubuntu:~$ mysqladmin -u root -p status&lt;br /&gt; Enter password: &lt;br /&gt; Uptime: 6034  Threads: 1  Questions: 3  Slow queries: 0  Opens: 12  Flush tables: 1  Open tables: 6  Queries per second avg: 0.000  &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;span style="font-weight:bold;"&gt;how to combine multiple mysqladmin commands together ?&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; mysqladmin  -u root -p process status version&lt;br /&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;span style="font-weight:bold;"&gt;How to kill a hanging MySQL Client Process?&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;  mysqladmin -u root -p processlist&lt;br /&gt;&lt;br /&gt;  This will give all the processes along with their IDs&lt;br /&gt;  &lt;br /&gt;  now to kill a process&lt;br /&gt;  &lt;br /&gt;  mysqladmin -u root -p kill PID&lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;What is the safe method to shutdown the MySQL server?&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;  mysqladmin -u root -p shutdown&lt;br /&gt;&lt;br /&gt; &lt;span style="font-weight:bold;"&gt; How to Delete/Drop an existing MySQL database?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  mysqladmin -u root -p drop databasename&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-6514850614515255443?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/6514850614515255443/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=6514850614515255443' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/6514850614515255443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/6514850614515255443'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/02/mysqladmin-utility.html' title='mysqladmin utility'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-4521842100300685057</id><published>2009-02-12T03:47:00.000-08:00</published><updated>2009-02-12T04:15:28.981-08:00</updated><title type='text'>mysqlshow</title><content type='html'>This little utility can provide quick information about your mysql installation and its component databases&lt;br /&gt;  &lt;br /&gt;  1) with no parameters, it lists all available databases&lt;br /&gt;&lt;br /&gt;   Ex:- &lt;span style="font-weight:bold;"&gt;mysqlshow  -u root &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;         restaurants &lt;br /&gt;         sample &lt;br /&gt;         tc_gen       &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  2) with a database as a parameter, it lists the tables in that database&lt;br /&gt;  3) with both a database and a table name, it lists columns in that table&lt;br /&gt;&lt;br /&gt;  4) with a database, table and column , it lists the details of the specified columns&lt;br /&gt;    &lt;br /&gt;  Ex:-&lt;br /&gt;&lt;br /&gt;     mysqlshow  -u username -p password databasename table name field name&lt;br /&gt;&lt;br /&gt;  5) &lt;br /&gt; &lt;br /&gt;  mysqlshow  -i  -u username -p password databasename tablename&lt;br /&gt;  &lt;br /&gt;   This will display the following information &lt;br /&gt; &lt;br /&gt;    * Name&lt;br /&gt;    * Engine&lt;br /&gt;    * Version&lt;br /&gt;    * Row_format&lt;br /&gt;    * Rows&lt;br /&gt;    * Avg_row_length&lt;br /&gt;    * Data_length&lt;br /&gt;    * Max_data_length&lt;br /&gt;    * Index_length&lt;br /&gt;    * Data_free&lt;br /&gt;    * Auto_increment&lt;br /&gt;    * Create_time&lt;br /&gt;    * Update_time&lt;br /&gt;    * Check_time&lt;br /&gt;    * Collation&lt;br /&gt;    * Checksum&lt;br /&gt;    * Create_options&lt;br /&gt;    * Comment&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-4521842100300685057?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/4521842100300685057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=4521842100300685057' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/4521842100300685057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/4521842100300685057'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/02/mysqlshow.html' title='mysqlshow'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-8803356540637808456</id><published>2009-02-12T03:46:00.000-08:00</published><updated>2009-02-12T03:47:29.320-08:00</updated><title type='text'>mysqlimport</title><content type='html'>The mysqlimport command is used to read large quantities of data from input file. the usual command specific parameters are filename and a database. generally you will be reading in a file created by mysqldump.but it is possible to read in a file created by mysqlimport as well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-8803356540637808456?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/8803356540637808456/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=8803356540637808456' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/8803356540637808456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/8803356540637808456'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/02/mysqlimport.html' title='mysqlimport'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-2207997883471628388</id><published>2009-02-04T20:54:00.000-08:00</published><updated>2009-02-04T20:58:10.468-08:00</updated><title type='text'>does anyone know of a quick piece of code to check my MySQL version?</title><content type='html'>To determine the version of the MySQL server running on host ‘elephant’ use:&lt;br /&gt;&lt;br /&gt; mysql -h elephant -V&lt;br /&gt; mysql Ver 12.21 Distrib 4.0.14, for pc-linux (i686)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; user@ubuntu:~$ mysql -h localhost -V&lt;br /&gt; mysql  Ver 14.12 Distrib 5.0.51a, for debian-linux-gnu (i486) using readline 5.2 &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; source:- &lt;span style="font-weight:bold;"&gt;http://www.tech-recipes.com/rx/272/determine-the-version-of-mysql-server/&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-2207997883471628388?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/2207997883471628388/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=2207997883471628388' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/2207997883471628388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/2207997883471628388'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/02/does-anyone-know-of-quick-piece-of-code.html' title='does anyone know of a quick piece of code to check my MySQL version?'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-1764221181879182903</id><published>2009-02-04T18:22:00.000-08:00</published><updated>2009-02-04T18:27:47.576-08:00</updated><title type='text'>currently logged in users</title><content type='html'>suppose i am logged in the mysql server with full administrative privileges now what is the command to get the list of all currently logged in users ? just like we type w command in Linux/UNIX ?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Jay alverson&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;     SHOW PROCESSLIST&lt;br /&gt;&lt;br /&gt;     Syntax:  SHOW [FULL] PROCESSLIST&lt;br /&gt;&lt;br /&gt;SHOW PROCESSLIST shows you which threads are running. You can also get this information using the &lt;span style="font-weight:bold;"&gt;mysqladmin processlist&lt;/span&gt; command. If you have the PROCESS privilege, you can see all threads. Otherwise, you can see only your own threads (that is, threads associated with the MySQL account that you are using). If you do not use the FULL keyword, only the first 100 characters of each statement are shown in the Info field.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; ex: mysql&gt; SHOW FULL PROCESSLIST\G&lt;br /&gt;&lt;br /&gt;  see: http://dev.mysql.com/doc/#refman&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-1764221181879182903?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/1764221181879182903/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=1764221181879182903' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/1764221181879182903'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/1764221181879182903'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/02/currently-logged-in-users.html' title='currently logged in users'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-9051761683291142004</id><published>2009-01-29T03:22:00.000-08:00</published><updated>2009-07-04T00:21:37.294-07:00</updated><title type='text'>how to create new user in mysql</title><content type='html'>zodiac@zodiac-desktop:~$ mysql -u root -p&lt;br /&gt;Enter password: &lt;br /&gt;Welcome to the MySQL monitor.  Commands end with ; or \g.&lt;br /&gt;Your MySQL connection id is 22&lt;br /&gt;Server version: 5.0.51a-3ubuntu5.4 (Ubuntu)&lt;br /&gt;&lt;br /&gt;Type 'help;' or '\h' for help. Type '\c' to clear the buffer.&lt;br /&gt;&lt;br /&gt;mysql&gt; grant all privileges on *.* to soumya@localhost identified by 'budhoos' with grant option;&lt;br /&gt;Query OK, 0 rows affected (0.02 sec)&lt;br /&gt;&lt;br /&gt;mysql&gt; commit;&lt;br /&gt;Query OK, 0 rows affected (0.00 sec)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;mysql&gt; commit;&lt;br /&gt;Query OK, 0 rows affected (0.00 sec)&lt;br /&gt;&lt;br /&gt;mysql&gt; grant all privileges on *.* to soumya@'%' identified by 'budhoos' with grant option;&lt;br /&gt;Query OK, 0 rows affected (0.00 sec)&lt;br /&gt;&lt;br /&gt;mysql&gt; grant reload,process on *.* to admin@localhost;&lt;br /&gt;Query OK, 0 rows affected (0.00 sec)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;grant all privileges on *.* to soumya@'%' identified by 'budhoos' with grant option;&lt;br /&gt;&lt;br /&gt;mysql&gt; GRANT USAGE ON *.* TO 'dummy'@'localhost';&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;OR&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;create user 'myuser'@'localhost';&lt;br /&gt;set password for 'myuser'@'localhost' = password('myuserpassword');    &lt;/span&gt; &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;see:- http://dev.mysql.com/doc/refman/5.1/en/adding-users.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-9051761683291142004?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/9051761683291142004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=9051761683291142004' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/9051761683291142004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/9051761683291142004'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/01/how-to-create-new-user-in-mysql.html' title='how to create new user in mysql'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-8280728780682649535</id><published>2009-01-23T01:59:00.000-08:00</published><updated>2009-01-23T02:00:10.332-08:00</updated><title type='text'>How to repair a table in mysql ?</title><content type='html'>REPAIR TABLE table name;&lt;br /&gt;     REPAIR TABLE table name QUICK;&lt;br /&gt;     REPAIR TABLE table name EXTENDED;&lt;br /&gt;     &lt;br /&gt;     if QUICK is given mysql will do a repair of the index tree.&lt;br /&gt;     if EXTENDED is given, it will create index ROW by ROW&lt;br /&gt;     &lt;br /&gt;     NB:- warning untested&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-8280728780682649535?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/8280728780682649535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=8280728780682649535' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/8280728780682649535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/8280728780682649535'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2009/01/how-to-repair-table-in-mysql.html' title='How to repair a table in mysql ?'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-2629415584991933312</id><published>2008-11-09T07:23:00.001-08:00</published><updated>2009-07-03T20:03:46.071-07:00</updated><title type='text'>Left Outer Join</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_nF2AQDhdiZc/Sk7GiM-D3gI/AAAAAAAABSY/sZuAXB8rT2I/s1600-h/left-outer-join.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 300px; height: 320px;" src="http://4.bp.blogspot.com/_nF2AQDhdiZc/Sk7GiM-D3gI/AAAAAAAABSY/sZuAXB8rT2I/s320/left-outer-join.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5354435297889476098" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_nF2AQDhdiZc/SRcAjG6khrI/AAAAAAAAAwQ/WSeHF-n3Faw/s1600-h/ojfigure3.gif"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 238px;" src="http://2.bp.blogspot.com/_nF2AQDhdiZc/SRcAjG6khrI/AAAAAAAAAwQ/WSeHF-n3Faw/s320/ojfigure3.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5266678892384782002" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-2629415584991933312?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/2629415584991933312/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=2629415584991933312' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/2629415584991933312'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/2629415584991933312'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2008/11/left-outer-join.html' title='Left Outer Join'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_nF2AQDhdiZc/Sk7GiM-D3gI/AAAAAAAABSY/sZuAXB8rT2I/s72-c/left-outer-join.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-3707832255985909099</id><published>2008-11-07T01:28:00.000-08:00</published><updated>2008-11-07T01:29:08.393-08:00</updated><title type='text'>Access Your MySQL Server Remotely Over SSH</title><content type='html'>So you've got MySQL on your web server, but it's only opened to local ports by default for security reasons. If you want to access your database from a client tool like the MySQL Query Browser, normally you'd have to open up access from your local IP address… but that's not nearly as secure.&lt;br /&gt;&lt;br /&gt;So instead, we'll just use port-forwarding through an SSH tunnel, so your MySQL client thinks it's connecting to your localhost machine, but it's really connecting to the other server through the tunnel.&lt;br /&gt;&lt;br /&gt;If you are using the command line ssh, the command would look like this. (You can do the same thing graphically in Putty or SecureCRT options if you need to)&lt;br /&gt;&lt;br /&gt;    ssh -L 3306:localhost:3306 geek@webserver.com&lt;br /&gt;&lt;br /&gt;The syntax is ssh -L &lt;localport&gt;hostname&lt;remoteport&gt; &lt;username&gt;@&lt;servername&gt;. We're using localhost as the hostname because we are directly accessing the remote mysql server through ssh. You could also use this technique to port-forward through one ssh server to another server.&lt;br /&gt;&lt;br /&gt;If you already have mysql running on your local machine then you can use a different local port for the port-forwarding, and just set your client tools to access MySQL on a different port.&lt;br /&gt;&lt;br /&gt;Warning :- untested&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-3707832255985909099?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/3707832255985909099/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=3707832255985909099' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/3707832255985909099'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/3707832255985909099'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2008/11/access-your-mysql-server-remotely-over.html' title='Access Your MySQL Server Remotely Over SSH'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-2953080335944587411</id><published>2008-10-18T23:53:00.001-07:00</published><updated>2008-10-18T23:53:24.795-07:00</updated><title type='text'>Renaming an Oracle table column</title><content type='html'>What is a name?  Plenty, if you ask many Oracle developers.  Back in the early days of Oracle7 it was a very cumbersome procedure to rename a column within a table, and some brave DBA's would go into the data dictionary and re-name the column directly!&lt;br /&gt;&lt;br /&gt;In Oracle 9i and above we have a simple rename column command that makes it easy to rename any table column.  Internally, the rename column syntax adjusts the Oracle data dictionary only, since the column names are not stored directly inside the segment itself:&lt;br /&gt;&lt;br /&gt;SQL&gt; desc sales&lt;br /&gt;&lt;br /&gt;Name             Null?    Type&lt;br /&gt;---------------- -------- ---------------&lt;br /&gt;STORE_KEY                 VARCHAR2(4)&lt;br /&gt;BOOK_KEY                  VARCHAR2(6)&lt;br /&gt;ORDER_NUMBER              VARCHAR2(20)&lt;br /&gt;ORDER_DATE                DATE&lt;br /&gt; &lt;br /&gt;SQL&gt; alter table sales rename column order_date to date_of_order;&lt;br /&gt; &lt;br /&gt;SQL&gt; desc sales&lt;br /&gt;&lt;br /&gt;Name             Null?    Type&lt;br /&gt;---------------- -------- ---------------&lt;br /&gt;STORE_KEY                 VARCHAR2(4)&lt;br /&gt;BOOK_KEY                  VARCHAR2(6)&lt;br /&gt;ORDER_NUMBER              VARCHAR2(20)&lt;br /&gt;DATE_OF_ORDER             DATE&lt;br /&gt; &lt;br /&gt;Of course, you must remember that PL/SQL and SQL that referenced the renamed column must be re-compiled.&lt;br /&gt;&lt;br /&gt;http://www.dba-oracle.com/t_rename_column_table.htm&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-2953080335944587411?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/2953080335944587411/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=2953080335944587411' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/2953080335944587411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/2953080335944587411'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2008/10/renaming-oracle-table-column.html' title='&lt;strong&gt;Renaming an Oracle table column&lt;/strong&gt;'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4297531928834740029.post-1645703934645874859</id><published>2008-08-12T04:59:00.000-07:00</published><updated>2008-08-12T05:00:55.304-07:00</updated><title type='text'>data warehousing - top-down</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_nF2AQDhdiZc/SKF7K1ufqYI/AAAAAAAAAhw/LokMbntKkEI/s1600-h/3.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_nF2AQDhdiZc/SKF7K1ufqYI/AAAAAAAAAhw/LokMbntKkEI/s320/3.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5233599668132227458" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4297531928834740029-1645703934645874859?l=aarklondatabasetrivia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aarklondatabasetrivia.blogspot.com/feeds/1645703934645874859/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4297531928834740029&amp;postID=1645703934645874859' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/1645703934645874859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4297531928834740029/posts/default/1645703934645874859'/><link rel='alternate' type='text/html' href='http://aarklondatabasetrivia.blogspot.com/2008/08/data-warehousing-top-down.html' title='data warehousing - top-down'/><author><name>aarklon</name><uri>http://www.blogger.com/profile/14737940988373030781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_nF2AQDhdiZc/Sl1O5YWlETI/AAAAAAAABVQ/hB9NlfvE620/S220/OAAAAJqSVX_df_Biw5qyitR7G35Jkttld1TwetvyqT-YPxGl_FqYuylAHJ9TM02oLogCBZqAoMxAnqg1-xZFX9q9mR4Am1T1UELvSVPhudFOJ9EcNveSorfb3FZr.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_nF2AQDhdiZc/SKF7K1ufqYI/AAAAAAAAAhw/LokMbntKkEI/s72-c/3.jpg' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
