<?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"
	>
<channel>
	<title>Comments on: How to Drop A Primary Key in Microsoft SQL Server</title>
	<atom:link href="http://gen5.info/q/2008/06/06/how-to-drop-a-primary-key-in-microsoft-sql-server/feed/" rel="self" type="application/rss+xml" />
	<link>http://gen5.info/q/2008/06/06/how-to-drop-a-primary-key-in-microsoft-sql-server/</link>
	<description>Towards Intelligent Systems</description>
	<pubDate>Thu, 20 Nov 2008 16:06:10 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Generation 5 &#187; Dropping Unique Constraints in SQL Server</title>
		<link>http://gen5.info/q/2008/06/06/how-to-drop-a-primary-key-in-microsoft-sql-server/#comment-553</link>
		<dc:creator>Generation 5 &#187; Dropping Unique Constraints in SQL Server</dc:creator>
		<pubDate>Thu, 26 Jun 2008 19:12:15 +0000</pubDate>
		<guid isPermaLink="false">http://gen5.info/q/?p=30#comment-553</guid>
		<description>[...] the spirit of &#8220;How To Drop A Primary Key in SQL Server&#8220;,  here&#8217;s a stored procedure that queries the data dictionary to find the names of any [...]</description>
		<content:encoded><![CDATA[<p>[...] the spirit of &#8220;How To Drop A Primary Key in SQL Server&#8220;,  here&#8217;s a stored procedure that queries the data dictionary to find the names of any [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://gen5.info/q/2008/06/06/how-to-drop-a-primary-key-in-microsoft-sql-server/#comment-509</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Mon, 09 Jun 2008 14:23:34 +0000</pubDate>
		<guid isPermaLink="false">http://gen5.info/q/?p=30#comment-509</guid>
		<description>Thanks Adrian!   I tested this and then updated the script.  It's nice to see what a wealth of information is in the system catalog tables.</description>
		<content:encoded><![CDATA[<p>Thanks Adrian!   I tested this and then updated the script.  It&#8217;s nice to see what a wealth of information is in the system catalog tables.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adrian Banks</title>
		<link>http://gen5.info/q/2008/06/06/how-to-drop-a-primary-key-in-microsoft-sql-server/#comment-505</link>
		<dc:creator>Adrian Banks</dc:creator>
		<pubDate>Sun, 08 Jun 2008 23:15:17 +0000</pubDate>
		<guid isPermaLink="false">http://gen5.info/q/?p=30#comment-505</guid>
		<description>A better query to find the primary key for the table would be:

SELECT [name] FROM sysobjects WHERE [xtype] = 'PK' AND [parent_obj] = OBJECT_ID(N'[dbo].[' + @tableName + ']')

This doesn't rely on a naming convention of primary keys' names starting with PK, but instead uses SQL Server's own data on whether the index is a primary key.</description>
		<content:encoded><![CDATA[<p>A better query to find the primary key for the table would be:</p>
<p>SELECT [name] FROM sysobjects WHERE [xtype] = &#8216;PK&#8217; AND [parent_obj] = OBJECT_ID(N&#8217;[dbo].[' + @tableName + ']&#8216;)</p>
<p>This doesn&#8217;t rely on a naming convention of primary keys&#8217; names starting with PK, but instead uses SQL Server&#8217;s own data on whether the index is a primary key.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
