<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>NewPush &#187; SQL</title>
	<atom:link href="http://newpush.com/tag/sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://newpush.com</link>
	<description>Server Hosting, Data Warehouse Hosting, Collaboration</description>
	<lastBuildDate>Sun, 05 Sep 2010 17:42:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Creating Delete Triggers in PostgreSQL</title>
		<link>http://newpush.com/2009/08/creating-delete-triggers-in-postgresql/</link>
		<comments>http://newpush.com/2009/08/creating-delete-triggers-in-postgresql/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 22:31:57 +0000</pubDate>
		<dc:creator>Balazs</dc:creator>
				<category><![CDATA[DB2]]></category>
		<category><![CDATA[PL/PGSQL]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Trigger]]></category>

		<guid isPermaLink="false">http://www.wdream.com/2009/08/creating-delete-triggers-in-postgresql/</guid>
		<description><![CDATA[One of the common data integrity issues that can happen in a database is the unintended deletion of a row. Here is how to create a DELETE trigger in PostgreSQL. The example code below assumes you have a &#8220;customer_cus&#8221; table &#8230; <a href="http://newpush.com/2009/08/creating-delete-triggers-in-postgresql/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of the common data integrity issues that can happen in a database is the unintended deletion of a row.  Here is how to create a DELETE trigger in PostgreSQL.</p>
<p>The example code below assumes you have a &#8220;customer_cus&#8221; table and a &#8220;customer_archive_cua&#8221; table with at least two fields.  It is a good idea to add a timestamp field to the archive table with DEFAULT now(), so that the date of deletion is captured.<br />
<code><br />
CREATE FUNCTION archive_customer() RETURNS TRIGGER AS '<br />
  BEGIN<br />
    INSERT INTO customer_archive_cua (name_cua, address_cua)<br />
      VALUES (OLD.name_cus,OLD.address_cus);<br />
    RETURN NULL;<br />
  END;<br />
' LANGUAGE 'plpgsql';<br />
CREATE TRIGGER customer_archive_on_delete AFTER DELETE ON customer_cus<br />
FOR EACH ROW EXECUTE PROCEDURE archive_customer();<br />
</code></p>
<h4>References</h4>
<ul>
<li><a href="http://www.amazon.com/gp/product/0672327562?ie=UTF8&#038;tag=wdr-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0672327562">PostgreSQL (2nd Edition) (Developer&#8217;s Library)</a><img src="http://www.assoc-amazon.com/e/ir?t=wdr-20&#038;l=as2&#038;o=1&#038;a=0672327562" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></li>
</ul>
<p><iframe src="http://rcm.amazon.com/e/cm?t=wdr-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=0672327562&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe></p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fnewpush.com%2F2009%2F08%2Fcreating-delete-triggers-in-postgresql%2F&amp;partner=sociable" title="Print"><img src="http://newpush.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fnewpush.com%2F2009%2F08%2Fcreating-delete-triggers-in-postgresql%2F&amp;title=Creating%20Delete%20Triggers%20in%20PostgreSQL&amp;bodytext=One%20of%20the%20common%20data%20integrity%20issues%20that%20can%20happen%20in%20a%20database%20is%20the%20unintended%20deletion%20of%20a%20row.%20%20Here%20is%20how%20to%20create%20a%20DELETE%20trigger%20in%20PostgreSQL.%0A%0AThe%20example%20code%20below%20assumes%20you%20have%20a%20%22customer_cus%22%20table%20and%20a%20%22customer_archive_" title="Digg"><img src="http://newpush.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fnewpush.com%2F2009%2F08%2Fcreating-delete-triggers-in-postgresql%2F&amp;title=Creating%20Delete%20Triggers%20in%20PostgreSQL&amp;notes=One%20of%20the%20common%20data%20integrity%20issues%20that%20can%20happen%20in%20a%20database%20is%20the%20unintended%20deletion%20of%20a%20row.%20%20Here%20is%20how%20to%20create%20a%20DELETE%20trigger%20in%20PostgreSQL.%0A%0AThe%20example%20code%20below%20assumes%20you%20have%20a%20%22customer_cus%22%20table%20and%20a%20%22customer_archive_" title="del.icio.us"><img src="http://newpush.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fnewpush.com%2F2009%2F08%2Fcreating-delete-triggers-in-postgresql%2F&amp;t=Creating%20Delete%20Triggers%20in%20PostgreSQL" title="Facebook"><img src="http://newpush.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fnewpush.com%2F2009%2F08%2Fcreating-delete-triggers-in-postgresql%2F&amp;title=Creating%20Delete%20Triggers%20in%20PostgreSQL&amp;annotation=One%20of%20the%20common%20data%20integrity%20issues%20that%20can%20happen%20in%20a%20database%20is%20the%20unintended%20deletion%20of%20a%20row.%20%20Here%20is%20how%20to%20create%20a%20DELETE%20trigger%20in%20PostgreSQL.%0A%0AThe%20example%20code%20below%20assumes%20you%20have%20a%20%22customer_cus%22%20table%20and%20a%20%22customer_archive_" title="Google Bookmarks"><img src="http://newpush.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a  href="http://blogplay.com" title="Blogplay"><img src="http://newpush.com/wp-content/plugins/sociable/images/blogplay.png" title="Blogplay" alt="Blogplay" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="mailto:?subject=Creating%20Delete%20Triggers%20in%20PostgreSQL&amp;body=http%3A%2F%2Fnewpush.com%2F2009%2F08%2Fcreating-delete-triggers-in-postgresql%2F" title="email"><img src="http://newpush.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fnewpush.com%2F2009%2F08%2Fcreating-delete-triggers-in-postgresql%2F&amp;title=Creating%20Delete%20Triggers%20in%20PostgreSQL&amp;source=NewPush+Server+Hosting%2C+Data+Warehouse+Hosting%2C+Collaboration&amp;summary=One%20of%20the%20common%20data%20integrity%20issues%20that%20can%20happen%20in%20a%20database%20is%20the%20unintended%20deletion%20of%20a%20row.%20%20Here%20is%20how%20to%20create%20a%20DELETE%20trigger%20in%20PostgreSQL.%0A%0AThe%20example%20code%20below%20assumes%20you%20have%20a%20%22customer_cus%22%20table%20and%20a%20%22customer_archive_" title="LinkedIn"><img src="http://newpush.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fnewpush.com%2F2009%2F08%2Fcreating-delete-triggers-in-postgresql%2F&amp;partner=sociable" title="PDF"><img src="http://newpush.com/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://ping.fm/ref/?link=http%3A%2F%2Fnewpush.com%2F2009%2F08%2Fcreating-delete-triggers-in-postgresql%2F&amp;title=Creating%20Delete%20Triggers%20in%20PostgreSQL&amp;body=One%20of%20the%20common%20data%20integrity%20issues%20that%20can%20happen%20in%20a%20database%20is%20the%20unintended%20deletion%20of%20a%20row.%20%20Here%20is%20how%20to%20create%20a%20DELETE%20trigger%20in%20PostgreSQL.%0A%0AThe%20example%20code%20below%20assumes%20you%20have%20a%20%22customer_cus%22%20table%20and%20a%20%22customer_archive_" title="Ping.fm"><img src="http://newpush.com/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://newpush.com/feed/" title="RSS"><img src="http://newpush.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://slashdot.org/bookmark.pl?title=Creating%20Delete%20Triggers%20in%20PostgreSQL&amp;url=http%3A%2F%2Fnewpush.com%2F2009%2F08%2Fcreating-delete-triggers-in-postgresql%2F" title="Slashdot"><img src="http://newpush.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://twitter.com/home?status=Creating%20Delete%20Triggers%20in%20PostgreSQL%20-%20http%3A%2F%2Fnewpush.com%2F2009%2F08%2Fcreating-delete-triggers-in-postgresql%2F" title="Twitter"><img src="http://newpush.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://newpush.com/2009/08/creating-delete-triggers-in-postgresql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DB2 INSERT INTO vs SELECT INTO</title>
		<link>http://newpush.com/2009/01/db2-insert-into-vs-select-into/</link>
		<comments>http://newpush.com/2009/01/db2-insert-into-vs-select-into/#comments</comments>
		<pubDate>Tue, 27 Jan 2009 18:19:24 +0000</pubDate>
		<dc:creator>Balazs</dc:creator>
				<category><![CDATA[DB2]]></category>
		<category><![CDATA[IBM]]></category>
		<category><![CDATA[insert]]></category>
		<category><![CDATA[insert into]]></category>
		<category><![CDATA[into]]></category>
		<category><![CDATA[select]]></category>
		<category><![CDATA[select into]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.wdream.com/archives/57</guid>
		<description><![CDATA[In DB2 if you need to populate a table, you need to use INSERT INTO, like in this example: INSERT INTO new_table SELECT col1,col2 FROM source_table WHERE col1='something'; and if you need to populate query variable, you need to use &#8230; <a href="http://newpush.com/2009/01/db2-insert-into-vs-select-into/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In DB2 if you need to populate a table, you need to use INSERT INTO, like in this example:</p>
<pre>INSERT INTO new_table
SELECT col1,col2 FROM source_table
WHERE col1='something';
</pre>
<p>and if you need to populate query variable, you need to use SELECT INTO, like in this example:</p>
<pre>SELECT * INTO :var1, :var2, :var3FROM table_name
WHERE col1= 'something'; </pre>
<p>Source: <a href="http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp">DB2 Documentation</a></p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fnewpush.com%2F2009%2F01%2Fdb2-insert-into-vs-select-into%2F&amp;partner=sociable" title="Print"><img src="http://newpush.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fnewpush.com%2F2009%2F01%2Fdb2-insert-into-vs-select-into%2F&amp;title=DB2%20INSERT%20INTO%20vs%20SELECT%20INTO&amp;bodytext=In%20DB2%20if%20you%20need%20to%20populate%20a%20table%2C%20you%20need%20to%20use%20INSERT%20INTO%2C%20like%20in%20this%20example%3AINSERT%20INTO%20new_table%0ASELECT%20col1%2Ccol2%20FROM%20source_table%0AWHERE%20col1%3D%27something%27%3B%0Aand%20if%20you%20need%20to%20populate%20query%20variable%2C%20you%20need%20to%20use%20SELECT%20INTO%2C%20like%20i" title="Digg"><img src="http://newpush.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fnewpush.com%2F2009%2F01%2Fdb2-insert-into-vs-select-into%2F&amp;title=DB2%20INSERT%20INTO%20vs%20SELECT%20INTO&amp;notes=In%20DB2%20if%20you%20need%20to%20populate%20a%20table%2C%20you%20need%20to%20use%20INSERT%20INTO%2C%20like%20in%20this%20example%3AINSERT%20INTO%20new_table%0ASELECT%20col1%2Ccol2%20FROM%20source_table%0AWHERE%20col1%3D%27something%27%3B%0Aand%20if%20you%20need%20to%20populate%20query%20variable%2C%20you%20need%20to%20use%20SELECT%20INTO%2C%20like%20i" title="del.icio.us"><img src="http://newpush.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fnewpush.com%2F2009%2F01%2Fdb2-insert-into-vs-select-into%2F&amp;t=DB2%20INSERT%20INTO%20vs%20SELECT%20INTO" title="Facebook"><img src="http://newpush.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fnewpush.com%2F2009%2F01%2Fdb2-insert-into-vs-select-into%2F&amp;title=DB2%20INSERT%20INTO%20vs%20SELECT%20INTO&amp;annotation=In%20DB2%20if%20you%20need%20to%20populate%20a%20table%2C%20you%20need%20to%20use%20INSERT%20INTO%2C%20like%20in%20this%20example%3AINSERT%20INTO%20new_table%0ASELECT%20col1%2Ccol2%20FROM%20source_table%0AWHERE%20col1%3D%27something%27%3B%0Aand%20if%20you%20need%20to%20populate%20query%20variable%2C%20you%20need%20to%20use%20SELECT%20INTO%2C%20like%20i" title="Google Bookmarks"><img src="http://newpush.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a  href="http://blogplay.com" title="Blogplay"><img src="http://newpush.com/wp-content/plugins/sociable/images/blogplay.png" title="Blogplay" alt="Blogplay" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="mailto:?subject=DB2%20INSERT%20INTO%20vs%20SELECT%20INTO&amp;body=http%3A%2F%2Fnewpush.com%2F2009%2F01%2Fdb2-insert-into-vs-select-into%2F" title="email"><img src="http://newpush.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fnewpush.com%2F2009%2F01%2Fdb2-insert-into-vs-select-into%2F&amp;title=DB2%20INSERT%20INTO%20vs%20SELECT%20INTO&amp;source=NewPush+Server+Hosting%2C+Data+Warehouse+Hosting%2C+Collaboration&amp;summary=In%20DB2%20if%20you%20need%20to%20populate%20a%20table%2C%20you%20need%20to%20use%20INSERT%20INTO%2C%20like%20in%20this%20example%3AINSERT%20INTO%20new_table%0ASELECT%20col1%2Ccol2%20FROM%20source_table%0AWHERE%20col1%3D%27something%27%3B%0Aand%20if%20you%20need%20to%20populate%20query%20variable%2C%20you%20need%20to%20use%20SELECT%20INTO%2C%20like%20i" title="LinkedIn"><img src="http://newpush.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fnewpush.com%2F2009%2F01%2Fdb2-insert-into-vs-select-into%2F&amp;partner=sociable" title="PDF"><img src="http://newpush.com/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://ping.fm/ref/?link=http%3A%2F%2Fnewpush.com%2F2009%2F01%2Fdb2-insert-into-vs-select-into%2F&amp;title=DB2%20INSERT%20INTO%20vs%20SELECT%20INTO&amp;body=In%20DB2%20if%20you%20need%20to%20populate%20a%20table%2C%20you%20need%20to%20use%20INSERT%20INTO%2C%20like%20in%20this%20example%3AINSERT%20INTO%20new_table%0ASELECT%20col1%2Ccol2%20FROM%20source_table%0AWHERE%20col1%3D%27something%27%3B%0Aand%20if%20you%20need%20to%20populate%20query%20variable%2C%20you%20need%20to%20use%20SELECT%20INTO%2C%20like%20i" title="Ping.fm"><img src="http://newpush.com/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://newpush.com/feed/" title="RSS"><img src="http://newpush.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://slashdot.org/bookmark.pl?title=DB2%20INSERT%20INTO%20vs%20SELECT%20INTO&amp;url=http%3A%2F%2Fnewpush.com%2F2009%2F01%2Fdb2-insert-into-vs-select-into%2F" title="Slashdot"><img src="http://newpush.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://twitter.com/home?status=DB2%20INSERT%20INTO%20vs%20SELECT%20INTO%20-%20http%3A%2F%2Fnewpush.com%2F2009%2F01%2Fdb2-insert-into-vs-select-into%2F" title="Twitter"><img src="http://newpush.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://newpush.com/2009/01/db2-insert-into-vs-select-into/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drop Index in MySQL takes forever</title>
		<link>http://newpush.com/2009/01/drop-index-in-mysql-takes-forever/</link>
		<comments>http://newpush.com/2009/01/drop-index-in-mysql-takes-forever/#comments</comments>
		<pubDate>Sun, 04 Jan 2009 04:39:16 +0000</pubDate>
		<dc:creator>Balazs</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[drop index]]></category>
		<category><![CDATA[myisamchk]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.wdream.com/archives/22</guid>
		<description><![CDATA[Even though for our core systems we have migrated most databases to DB2, we still have to deal with MySQL for some side systems, such as CRM, Blog, etc. &#160; One of the MySQL features that I recently noticed is &#8230; <a href="http://newpush.com/2009/01/drop-index-in-mysql-takes-forever/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Even though for our core systems we have migrated most databases to DB2, we still have to deal with MySQL for some side systems, such as CRM, Blog, etc. &nbsp; One of the MySQL features that I recently noticed is that dropping indexes on sizable tables takes forever.&nbsp; That is apparently due to a convoluted indexing process in MySQL.&nbsp; The workaround was found here: <a href="http://lists.mysql.com/mysql/202489">MySQL General Discussion List</a></p>
<p>It goes as follows:
<pre>1) create table T1 like T;This creates an empty table T1 with indexes ndx1,ndx2,ndx3 and ndx4.2) alter table T1 drop index ndx3;This drops index ndx3 on the empty T1, which should be instantaneous.3) insert into T1 select * from T;This will populate table T and load all three(3) indexes for T1 in one pass.4) drop table table T;5) alter table T1 rename to T;</pre>
<p> An alternative ugly hack is to start the drop index, kill the database server.&nbsp; That will crash the table on which the drop index was.&nbsp; The crashed table can be recovered by running mysiamchk.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fnewpush.com%2F2009%2F01%2Fdrop-index-in-mysql-takes-forever%2F&amp;partner=sociable" title="Print"><img src="http://newpush.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fnewpush.com%2F2009%2F01%2Fdrop-index-in-mysql-takes-forever%2F&amp;title=Drop%20Index%20in%20MySQL%20takes%20forever&amp;bodytext=Even%20though%20for%20our%20core%20systems%20we%20have%20migrated%20most%20databases%20to%20DB2%2C%20we%20still%20have%20to%20deal%20with%20MySQL%20for%20some%20side%20systems%2C%20such%20as%20CRM%2C%20Blog%2C%20etc.%20%26nbsp%3B%20One%20of%20the%20MySQL%20features%20that%20I%20recently%20noticed%20is%20that%20dropping%20indexes%20on%20sizable%20tabl" title="Digg"><img src="http://newpush.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fnewpush.com%2F2009%2F01%2Fdrop-index-in-mysql-takes-forever%2F&amp;title=Drop%20Index%20in%20MySQL%20takes%20forever&amp;notes=Even%20though%20for%20our%20core%20systems%20we%20have%20migrated%20most%20databases%20to%20DB2%2C%20we%20still%20have%20to%20deal%20with%20MySQL%20for%20some%20side%20systems%2C%20such%20as%20CRM%2C%20Blog%2C%20etc.%20%26nbsp%3B%20One%20of%20the%20MySQL%20features%20that%20I%20recently%20noticed%20is%20that%20dropping%20indexes%20on%20sizable%20tabl" title="del.icio.us"><img src="http://newpush.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fnewpush.com%2F2009%2F01%2Fdrop-index-in-mysql-takes-forever%2F&amp;t=Drop%20Index%20in%20MySQL%20takes%20forever" title="Facebook"><img src="http://newpush.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fnewpush.com%2F2009%2F01%2Fdrop-index-in-mysql-takes-forever%2F&amp;title=Drop%20Index%20in%20MySQL%20takes%20forever&amp;annotation=Even%20though%20for%20our%20core%20systems%20we%20have%20migrated%20most%20databases%20to%20DB2%2C%20we%20still%20have%20to%20deal%20with%20MySQL%20for%20some%20side%20systems%2C%20such%20as%20CRM%2C%20Blog%2C%20etc.%20%26nbsp%3B%20One%20of%20the%20MySQL%20features%20that%20I%20recently%20noticed%20is%20that%20dropping%20indexes%20on%20sizable%20tabl" title="Google Bookmarks"><img src="http://newpush.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a  href="http://blogplay.com" title="Blogplay"><img src="http://newpush.com/wp-content/plugins/sociable/images/blogplay.png" title="Blogplay" alt="Blogplay" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="mailto:?subject=Drop%20Index%20in%20MySQL%20takes%20forever&amp;body=http%3A%2F%2Fnewpush.com%2F2009%2F01%2Fdrop-index-in-mysql-takes-forever%2F" title="email"><img src="http://newpush.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fnewpush.com%2F2009%2F01%2Fdrop-index-in-mysql-takes-forever%2F&amp;title=Drop%20Index%20in%20MySQL%20takes%20forever&amp;source=NewPush+Server+Hosting%2C+Data+Warehouse+Hosting%2C+Collaboration&amp;summary=Even%20though%20for%20our%20core%20systems%20we%20have%20migrated%20most%20databases%20to%20DB2%2C%20we%20still%20have%20to%20deal%20with%20MySQL%20for%20some%20side%20systems%2C%20such%20as%20CRM%2C%20Blog%2C%20etc.%20%26nbsp%3B%20One%20of%20the%20MySQL%20features%20that%20I%20recently%20noticed%20is%20that%20dropping%20indexes%20on%20sizable%20tabl" title="LinkedIn"><img src="http://newpush.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fnewpush.com%2F2009%2F01%2Fdrop-index-in-mysql-takes-forever%2F&amp;partner=sociable" title="PDF"><img src="http://newpush.com/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://ping.fm/ref/?link=http%3A%2F%2Fnewpush.com%2F2009%2F01%2Fdrop-index-in-mysql-takes-forever%2F&amp;title=Drop%20Index%20in%20MySQL%20takes%20forever&amp;body=Even%20though%20for%20our%20core%20systems%20we%20have%20migrated%20most%20databases%20to%20DB2%2C%20we%20still%20have%20to%20deal%20with%20MySQL%20for%20some%20side%20systems%2C%20such%20as%20CRM%2C%20Blog%2C%20etc.%20%26nbsp%3B%20One%20of%20the%20MySQL%20features%20that%20I%20recently%20noticed%20is%20that%20dropping%20indexes%20on%20sizable%20tabl" title="Ping.fm"><img src="http://newpush.com/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://newpush.com/feed/" title="RSS"><img src="http://newpush.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://slashdot.org/bookmark.pl?title=Drop%20Index%20in%20MySQL%20takes%20forever&amp;url=http%3A%2F%2Fnewpush.com%2F2009%2F01%2Fdrop-index-in-mysql-takes-forever%2F" title="Slashdot"><img src="http://newpush.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://twitter.com/home?status=Drop%20Index%20in%20MySQL%20takes%20forever%20-%20http%3A%2F%2Fnewpush.com%2F2009%2F01%2Fdrop-index-in-mysql-takes-forever%2F" title="Twitter"><img src="http://newpush.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://newpush.com/2009/01/drop-index-in-mysql-takes-forever/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Escape SQL apostrophe</title>
		<link>http://newpush.com/2008/10/escape-sql-apostrophe/</link>
		<comments>http://newpush.com/2008/10/escape-sql-apostrophe/#comments</comments>
		<pubDate>Wed, 15 Oct 2008 21:56:44 +0000</pubDate>
		<dc:creator>Balazs</dc:creator>
				<category><![CDATA[DB2]]></category>
		<category><![CDATA[escape]]></category>
		<category><![CDATA[IBM]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.wdream.com/archives/14</guid>
		<description><![CDATA[Many drivers have ways to escape SQL strings to make sure no malicious activity is going on.&#160; Usually you can use a function in the driver that can take care of that.&#160; However, if all you need is too escape &#8230; <a href="http://newpush.com/2008/10/escape-sql-apostrophe/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Many drivers have ways to escape SQL strings to make sure no malicious activity is going on.&nbsp; Usually you can use a function in the driver that can take care of that.&nbsp; However, if all you need is too escape a single quote, you can also use the double quote method:<br />&nbsp;
<pre>reliability is key to gain customers' loyalty</pre>
<p>becomes
<pre>reliability is key to gain customers'' loyalty</pre>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fnewpush.com%2F2008%2F10%2Fescape-sql-apostrophe%2F&amp;partner=sociable" title="Print"><img src="http://newpush.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fnewpush.com%2F2008%2F10%2Fescape-sql-apostrophe%2F&amp;title=Escape%20SQL%20apostrophe&amp;bodytext=Many%20drivers%20have%20ways%20to%20escape%20SQL%20strings%20to%20make%20sure%20no%20malicious%20activity%20is%20going%20on.%26nbsp%3B%20Usually%20you%20can%20use%20a%20function%20in%20the%20driver%20that%20can%20take%20care%20of%20that.%26nbsp%3B%20However%2C%20if%20all%20you%20need%20is%20too%20escape%20a%20single%20quote%2C%20you%20can%20also%20use%20" title="Digg"><img src="http://newpush.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fnewpush.com%2F2008%2F10%2Fescape-sql-apostrophe%2F&amp;title=Escape%20SQL%20apostrophe&amp;notes=Many%20drivers%20have%20ways%20to%20escape%20SQL%20strings%20to%20make%20sure%20no%20malicious%20activity%20is%20going%20on.%26nbsp%3B%20Usually%20you%20can%20use%20a%20function%20in%20the%20driver%20that%20can%20take%20care%20of%20that.%26nbsp%3B%20However%2C%20if%20all%20you%20need%20is%20too%20escape%20a%20single%20quote%2C%20you%20can%20also%20use%20" title="del.icio.us"><img src="http://newpush.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fnewpush.com%2F2008%2F10%2Fescape-sql-apostrophe%2F&amp;t=Escape%20SQL%20apostrophe" title="Facebook"><img src="http://newpush.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fnewpush.com%2F2008%2F10%2Fescape-sql-apostrophe%2F&amp;title=Escape%20SQL%20apostrophe&amp;annotation=Many%20drivers%20have%20ways%20to%20escape%20SQL%20strings%20to%20make%20sure%20no%20malicious%20activity%20is%20going%20on.%26nbsp%3B%20Usually%20you%20can%20use%20a%20function%20in%20the%20driver%20that%20can%20take%20care%20of%20that.%26nbsp%3B%20However%2C%20if%20all%20you%20need%20is%20too%20escape%20a%20single%20quote%2C%20you%20can%20also%20use%20" title="Google Bookmarks"><img src="http://newpush.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a  href="http://blogplay.com" title="Blogplay"><img src="http://newpush.com/wp-content/plugins/sociable/images/blogplay.png" title="Blogplay" alt="Blogplay" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="mailto:?subject=Escape%20SQL%20apostrophe&amp;body=http%3A%2F%2Fnewpush.com%2F2008%2F10%2Fescape-sql-apostrophe%2F" title="email"><img src="http://newpush.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fnewpush.com%2F2008%2F10%2Fescape-sql-apostrophe%2F&amp;title=Escape%20SQL%20apostrophe&amp;source=NewPush+Server+Hosting%2C+Data+Warehouse+Hosting%2C+Collaboration&amp;summary=Many%20drivers%20have%20ways%20to%20escape%20SQL%20strings%20to%20make%20sure%20no%20malicious%20activity%20is%20going%20on.%26nbsp%3B%20Usually%20you%20can%20use%20a%20function%20in%20the%20driver%20that%20can%20take%20care%20of%20that.%26nbsp%3B%20However%2C%20if%20all%20you%20need%20is%20too%20escape%20a%20single%20quote%2C%20you%20can%20also%20use%20" title="LinkedIn"><img src="http://newpush.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fnewpush.com%2F2008%2F10%2Fescape-sql-apostrophe%2F&amp;partner=sociable" title="PDF"><img src="http://newpush.com/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://ping.fm/ref/?link=http%3A%2F%2Fnewpush.com%2F2008%2F10%2Fescape-sql-apostrophe%2F&amp;title=Escape%20SQL%20apostrophe&amp;body=Many%20drivers%20have%20ways%20to%20escape%20SQL%20strings%20to%20make%20sure%20no%20malicious%20activity%20is%20going%20on.%26nbsp%3B%20Usually%20you%20can%20use%20a%20function%20in%20the%20driver%20that%20can%20take%20care%20of%20that.%26nbsp%3B%20However%2C%20if%20all%20you%20need%20is%20too%20escape%20a%20single%20quote%2C%20you%20can%20also%20use%20" title="Ping.fm"><img src="http://newpush.com/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://newpush.com/feed/" title="RSS"><img src="http://newpush.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://slashdot.org/bookmark.pl?title=Escape%20SQL%20apostrophe&amp;url=http%3A%2F%2Fnewpush.com%2F2008%2F10%2Fescape-sql-apostrophe%2F" title="Slashdot"><img src="http://newpush.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://twitter.com/home?status=Escape%20SQL%20apostrophe%20-%20http%3A%2F%2Fnewpush.com%2F2008%2F10%2Fescape-sql-apostrophe%2F" title="Twitter"><img src="http://newpush.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://newpush.com/2008/10/escape-sql-apostrophe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
