<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: How to write multi-table, cross-database deletes with aliases in MySQL</title>
	<link>http://www.xaprb.com/blog/2006/08/07/how-to-write-multi-table-cross-database-deletes-with-aliases-in-mysql/</link>
	<description>Stay curious!</description>
	<pubDate>Sun, 20 Jul 2008 22:41:56 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.2</generator>

	<item>
		<title>By: Sprok</title>
		<link>http://www.xaprb.com/blog/2006/08/07/how-to-write-multi-table-cross-database-deletes-with-aliases-in-mysql/#comment-5771</link>
		<author>Sprok</author>
		<pubDate>Mon, 16 Apr 2007 06:41:53 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2006/08/07/how-to-write-multi-table-cross-database-deletes-with-aliases-in-mysql/#comment-5771</guid>
		<description>&lt;p&gt;Thank you so much. You saved my neck :D&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Thank you so much. You saved my neck :D</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xaprb</title>
		<link>http://www.xaprb.com/blog/2006/08/07/how-to-write-multi-table-cross-database-deletes-with-aliases-in-mysql/#comment-5658</link>
		<author>Xaprb</author>
		<pubDate>Wed, 11 Apr 2007 18:21:12 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2006/08/07/how-to-write-multi-table-cross-database-deletes-with-aliases-in-mysql/#comment-5658</guid>
		<description>&lt;p&gt;You can't do it.  You may want to look into the FEDERATED storage engine.  For more help, try the #mysql IRC channel.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>You can&#8217;t do it.  You may want to look into the FEDERATED storage engine.  For more help, try the #mysql IRC channel.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anz</title>
		<link>http://www.xaprb.com/blog/2006/08/07/how-to-write-multi-table-cross-database-deletes-with-aliases-in-mysql/#comment-5636</link>
		<author>Anz</author>
		<pubDate>Wed, 11 Apr 2007 10:32:12 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2006/08/07/how-to-write-multi-table-cross-database-deletes-with-aliases-in-mysql/#comment-5636</guid>
		<description>&lt;p&gt;Hi,
Can you please tell me how can write CROSS-SERVER queries in mysql. I want to join tables from two different mysql servers for .net desktop application.

Thanks
Anz&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Can you please tell me how can write CROSS-SERVER queries in mysql. I want to join tables from two different mysql servers for .net desktop application.</p>
<p>Thanks<br />
Anz</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xaprb</title>
		<link>http://www.xaprb.com/blog/2006/08/07/how-to-write-multi-table-cross-database-deletes-with-aliases-in-mysql/#comment-3057</link>
		<author>Xaprb</author>
		<pubDate>Tue, 09 Jan 2007 19:52:50 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2006/08/07/how-to-write-multi-table-cross-database-deletes-with-aliases-in-mysql/#comment-3057</guid>
		<description>&lt;p&gt;This technique is specifically about cross-database joins on MySQL, which has some very annoying quirks.  It doesn't apply to selects.  I've never seen syntax quite like yours -- you might not have valid SQL there.  Also, you seem to be talking about cross-server deletes; this is only cross-database, not cross-server (a single server/instance may have many databases).&lt;/p&gt;

&lt;p&gt;You should probably seek help on #mysql or a mailing list.  There are lots of friendly folks there who can help you more quickly than I'll be able to in these comments ;-)&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>This technique is specifically about cross-database joins on MySQL, which has some very annoying quirks.  It doesn&#8217;t apply to selects.  I&#8217;ve never seen syntax quite like yours &#8212; you might not have valid SQL there.  Also, you seem to be talking about cross-server deletes; this is only cross-database, not cross-server (a single server/instance may have many databases).</p>
<p>You should probably seek help on #mysql or a mailing list.  There are lots of friendly folks there who can help you more quickly than I&#8217;ll be able to in these comments ;-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BermG</title>
		<link>http://www.xaprb.com/blog/2006/08/07/how-to-write-multi-table-cross-database-deletes-with-aliases-in-mysql/#comment-3056</link>
		<author>BermG</author>
		<pubDate>Tue, 09 Jan 2007 19:15:46 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2006/08/07/how-to-write-multi-table-cross-database-deletes-with-aliases-in-mysql/#comment-3056</guid>
		<description>&lt;p&gt;Will this work with db2 and MySQL tables?  My query fails with the same error:&lt;/p&gt;

&lt;pre&gt;SELECT incident.guid, incident.update_date, task1.short_description FROM (
DB2_A.incident incident  LEFT JOIN MySQL_B.task task1 ON incident.incident_id = task1.id
)  WHERE incident.guid = x'FF0BFBDD917EEB7D55B545FBD889FEEB'&lt;/pre&gt;

&lt;p&gt;How should I change this query?  I played with quite a few combinations but still can't get by this error.

Thanks&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Will this work with db2 and MySQL tables?  My query fails with the same error:</p>
<pre>SELECT incident.guid, incident.update_date, task1.short_description FROM (
DB2_A.incident incident  LEFT JOIN MySQL_B.task task1 ON incident.incident_id = task1.id
)  WHERE incident.guid = x'FF0BFBDD917EEB7D55B545FBD889FEEB'</pre>
<p>How should I change this query?  I played with quite a few combinations but still can&#8217;t get by this error.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xaprb</title>
		<link>http://www.xaprb.com/blog/2006/08/07/how-to-write-multi-table-cross-database-deletes-with-aliases-in-mysql/#comment-1493</link>
		<author>Xaprb</author>
		<pubDate>Mon, 14 Aug 2006 19:32:18 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2006/08/07/how-to-write-multi-table-cross-database-deletes-with-aliases-in-mysql/#comment-1493</guid>
		<description>&lt;p&gt;Right, you also need to fully qualify the tables with a database name too.  I mentioned that in the first article, but left it out of this one.&lt;/p&gt;

&lt;p&gt;So your code should say,&lt;/p&gt;

&lt;pre&gt;delete somedb.tag_item as ti, somedb.list_item as li...&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Right, you also need to fully qualify the tables with a database name too.  I mentioned that in the first article, but left it out of this one.</p>
<p>So your code should say,</p>
<pre>delete somedb.tag_item as ti, somedb.list_item as li...</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick</title>
		<link>http://www.xaprb.com/blog/2006/08/07/how-to-write-multi-table-cross-database-deletes-with-aliases-in-mysql/#comment-1492</link>
		<author>Patrick</author>
		<pubDate>Mon, 14 Aug 2006 18:59:55 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2006/08/07/how-to-write-multi-table-cross-database-deletes-with-aliases-in-mysql/#comment-1492</guid>
		<description>&lt;p&gt;I tried your method, however it doesn't seem to work with multiple tables in the delete statement using jdbc / connection j&lt;/p&gt;

&lt;pre&gt;delete tag_item as ti, list_item as li 
    from  tag_item as ti, list_item as li
where  ti.li_id = li.id and li.datum_id = ? and li.user_id = ?;&lt;/pre&gt;

&lt;p&gt;I keep getting Unknown table 'li' in MULTI DELETE&lt;/p&gt;

&lt;p&gt;On mysql 5.0.2.2&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>I tried your method, however it doesn&#8217;t seem to work with multiple tables in the delete statement using jdbc / connection j</p>
<pre>delete tag_item as ti, list_item as li
    from  tag_item as ti, list_item as li
where  ti.li_id = li.id and li.datum_id = ? and li.user_id = ?;</pre>
<p>I keep getting Unknown table &#8216;li&#8217; in MULTI DELETE</p>
<p>On mysql 5.0.2.2</p>
]]></content:encoded>
	</item>
</channel>
</rss>
