<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Drop all foreign keys</title>
	<atom:link href="http://www.thestidhams.com/tom/wp/2007/07/23/drop-all-foreign-keys/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thestidhams.com/tom/wp/2007/07/23/drop-all-foreign-keys/</link>
	<description>Tom's notes of what is happening and the computers I use</description>
	<lastBuildDate>Thu, 07 Jan 2010 06:49:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Feryt</title>
		<link>http://www.thestidhams.com/tom/wp/2007/07/23/drop-all-foreign-keys/comment-page-1/#comment-33412</link>
		<dc:creator>Feryt</dc:creator>
		<pubDate>Fri, 03 Oct 2008 20:40:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.thestidhams.com/tom/wp/2007/07/23/drop-all-foreign-keys/#comment-33412</guid>
		<description>This should work for all weird table names:

SELECT &#039;ALTER TABLE &#039; + TABLE_SCHEMA + &#039;.[&#039; + TABLE_NAME +
&#039;] DROP CONSTRAINT [&#039; + CONSTRAINT_NAME + &#039;]&#039;
FROM information_schema.table_constraints
WHERE CONSTRAINT_TYPE = &#039;FOREIGN KEY&#039;</description>
		<content:encoded><![CDATA[<p>This should work for all weird table names:</p>
<p>SELECT &#8216;ALTER TABLE &#8216; + TABLE_SCHEMA + &#8216;.[' + TABLE_NAME +<br />
'] DROP CONSTRAINT [' + CONSTRAINT_NAME + ']&#8216;<br />
FROM information_schema.table_constraints<br />
WHERE CONSTRAINT_TYPE = &#8216;FOREIGN KEY&#8217;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.120 seconds -->
