<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; 2005 &#8211; Find Tables With Primary Key Constraint in Database</title>
	<atom:link href="http://blog.sqlauthority.com/2007/09/04/sql-server-2005-find-tables-with-primary-key-constraint-in-database/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2007/09/04/sql-server-2005-find-tables-with-primary-key-constraint-in-database/</link>
	<description>Notes of a SQL Server MVP and Database Administrator</description>
	<lastBuildDate>Sat, 21 Nov 2009 05:54:09 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Kash</title>
		<link>http://blog.sqlauthority.com/2007/09/04/sql-server-2005-find-tables-with-primary-key-constraint-in-database/#comment-43721</link>
		<dc:creator>Kash</dc:creator>
		<pubDate>Wed, 15 Oct 2008 19:58:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/04/sql-server-2005-find-tables-with-primary-key-constraint-in-database/#comment-43721</guid>
		<description>I have one parent table and has 10 child tables.

I would like to delete the child table records first then perent
database level, through constraints and triggers.

All these tables has forign key constrains.

Please advise the better way. I am using sql server 2005.</description>
		<content:encoded><![CDATA[<p>I have one parent table and has 10 child tables.</p>
<p>I would like to delete the child table records first then perent<br />
database level, through constraints and triggers.</p>
<p>All these tables has forign key constrains.</p>
<p>Please advise the better way. I am using sql server 2005.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/2007/09/04/sql-server-2005-find-tables-with-primary-key-constraint-in-database/#comment-43011</link>
		<dc:creator>pinaldave</dc:creator>
		<pubDate>Sat, 20 Sep 2008 01:15:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/04/sql-server-2005-find-tables-with-primary-key-constraint-in-database/#comment-43011</guid>
		<description>Imran,

You are correct.

Regards,
Pinal Dave ( http://www.SQLAuthority.com )</description>
		<content:encoded><![CDATA[<p>Imran,</p>
<p>You are correct.</p>
<p>Regards,<br />
Pinal Dave ( <a href="http://www.SQLAuthority.com" rel="nofollow">http://www.SQLAuthority.com</a> )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Imran Mohammed</title>
		<link>http://blog.sqlauthority.com/2007/09/04/sql-server-2005-find-tables-with-primary-key-constraint-in-database/#comment-43010</link>
		<dc:creator>Imran Mohammed</dc:creator>
		<pubDate>Sat, 20 Sep 2008 01:09:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/04/sql-server-2005-find-tables-with-primary-key-constraint-in-database/#comment-43010</guid>
		<description>Hello Shwetang,

What I read on internet, is it is not possible to create a foriegn key constraint referencing table outside database. 

I tried myself creating this but had no luck...

The only solution to your problem is triggers. 

or create child table in the same database as parent table.

Thanks,
Imran</description>
		<content:encoded><![CDATA[<p>Hello Shwetang,</p>
<p>What I read on internet, is it is not possible to create a foriegn key constraint referencing table outside database. </p>
<p>I tried myself creating this but had no luck&#8230;</p>
<p>The only solution to your problem is triggers. </p>
<p>or create child table in the same database as parent table.</p>
<p>Thanks,<br />
Imran</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shwetang</title>
		<link>http://blog.sqlauthority.com/2007/09/04/sql-server-2005-find-tables-with-primary-key-constraint-in-database/#comment-43001</link>
		<dc:creator>Shwetang</dc:creator>
		<pubDate>Fri, 19 Sep 2008 18:33:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/04/sql-server-2005-find-tables-with-primary-key-constraint-in-database/#comment-43001</guid>
		<description>I&#039;m havin two database, could i map a foeign key constraint in the other database
e.g 
database A-&gt;table xyz.id set primary key
I&#039;wanna make foreign key to
database B-&gt; table xyz.pid

is it possible</description>
		<content:encoded><![CDATA[<p>I&#8217;m havin two database, could i map a foeign key constraint in the other database<br />
e.g<br />
database A-&gt;table xyz.id set primary key<br />
I&#8217;wanna make foreign key to<br />
database B-&gt; table xyz.pid</p>
<p>is it possible</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amit Habu</title>
		<link>http://blog.sqlauthority.com/2007/09/04/sql-server-2005-find-tables-with-primary-key-constraint-in-database/#comment-40684</link>
		<dc:creator>Amit Habu</dc:creator>
		<pubDate>Wed, 23 Jul 2008 08:24:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/04/sql-server-2005-find-tables-with-primary-key-constraint-in-database/#comment-40684</guid>
		<description>I want to know how to write a constraint i.e a primary key in already defined table.Alter syntax with constraints</description>
		<content:encoded><![CDATA[<p>I want to know how to write a constraint i.e a primary key in already defined table.Alter syntax with constraints</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: raghuram</title>
		<link>http://blog.sqlauthority.com/2007/09/04/sql-server-2005-find-tables-with-primary-key-constraint-in-database/#comment-39546</link>
		<dc:creator>raghuram</dc:creator>
		<pubDate>Fri, 27 Jun 2008 06:11:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/04/sql-server-2005-find-tables-with-primary-key-constraint-in-database/#comment-39546</guid>
		<description>hi,
  i want to know how do we define multiple primary keys into a table.when i gave command twice, it is showing syntax error
 expecting reply soon

raghu</description>
		<content:encoded><![CDATA[<p>hi,<br />
  i want to know how do we define multiple primary keys into a table.when i gave command twice, it is showing syntax error<br />
 expecting reply soon</p>
<p>raghu</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: durgesh</title>
		<link>http://blog.sqlauthority.com/2007/09/04/sql-server-2005-find-tables-with-primary-key-constraint-in-database/#comment-38994</link>
		<dc:creator>durgesh</dc:creator>
		<pubDate>Thu, 05 Jun 2008 11:01:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/04/sql-server-2005-find-tables-with-primary-key-constraint-in-database/#comment-38994</guid>
		<description>i want to join two table with same column name but different values.</description>
		<content:encoded><![CDATA[<p>i want to join two table with same column name but different values.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sanju Bhatia</title>
		<link>http://blog.sqlauthority.com/2007/09/04/sql-server-2005-find-tables-with-primary-key-constraint-in-database/#comment-38966</link>
		<dc:creator>Sanju Bhatia</dc:creator>
		<pubDate>Wed, 04 Jun 2008 08:47:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/04/sql-server-2005-find-tables-with-primary-key-constraint-in-database/#comment-38966</guid>
		<description>Why we see all related table data on a primary key. for example a employe table e1 has a primary key id and e2 has f. k id and e3 has also id as a f.k. we search all data on 3 tables e1 e2 e3 on primary key without gaves table e2 and e3 names only e1 and primary key</description>
		<content:encoded><![CDATA[<p>Why we see all related table data on a primary key. for example a employe table e1 has a primary key id and e2 has f. k id and e3 has also id as a f.k. we search all data on 3 tables e1 e2 e3 on primary key without gaves table e2 and e3 names only e1 and primary key</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bharath</title>
		<link>http://blog.sqlauthority.com/2007/09/04/sql-server-2005-find-tables-with-primary-key-constraint-in-database/#comment-37185</link>
		<dc:creator>Bharath</dc:creator>
		<pubDate>Wed, 07 May 2008 11:43:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/04/sql-server-2005-find-tables-with-primary-key-constraint-in-database/#comment-37185</guid>
		<description>How do u find out the which column is the primary key column in a table if the we are not able to view the design or the script the tabel?

Thanks,
Bharath</description>
		<content:encoded><![CDATA[<p>How do u find out the which column is the primary key column in a table if the we are not able to view the design or the script the tabel?</p>
<p>Thanks,<br />
Bharath</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sekar</title>
		<link>http://blog.sqlauthority.com/2007/09/04/sql-server-2005-find-tables-with-primary-key-constraint-in-database/#comment-37091</link>
		<dc:creator>sekar</dc:creator>
		<pubDate>Tue, 06 May 2008 17:37:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/04/sql-server-2005-find-tables-with-primary-key-constraint-in-database/#comment-37091</guid>
		<description>How to delete records parent and child tables

waiting for your query

with regards
sekar</description>
		<content:encoded><![CDATA[<p>How to delete records parent and child tables</p>
<p>waiting for your query</p>
<p>with regards<br />
sekar</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER - 2005 Find Table without Clustered Index - Find Table with no Primary Key Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2007/09/04/sql-server-2005-find-tables-with-primary-key-constraint-in-database/#comment-35368</link>
		<dc:creator>SQL SERVER - 2005 Find Table without Clustered Index - Find Table with no Primary Key Journey to SQL Authority with Pinal Dave</dc:creator>
		<pubDate>Wed, 23 Apr 2008 06:10:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/04/sql-server-2005-find-tables-with-primary-key-constraint-in-database/#comment-35368</guid>
		<description>[...] SQL SERVER - 2005 - Find Tables With Primary Key Constraint in Database SQL SERVER - 2005 - Find Tables With Foreign Key Constraint in Database  [...]</description>
		<content:encoded><![CDATA[<p>[...] SQL SERVER &#8211; 2005 &#8211; Find Tables With Primary Key Constraint in Database SQL SERVER &#8211; 2005 &#8211; Find Tables With Foreign Key Constraint in Database  [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Srikanto</title>
		<link>http://blog.sqlauthority.com/2007/09/04/sql-server-2005-find-tables-with-primary-key-constraint-in-database/#comment-34843</link>
		<dc:creator>Srikanto</dc:creator>
		<pubDate>Fri, 04 Apr 2008 11:00:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/04/sql-server-2005-find-tables-with-primary-key-constraint-in-database/#comment-34843</guid>
		<description>How to find the constraint name of a particular Table at SQL SERVER 2005


Please Help Me</description>
		<content:encoded><![CDATA[<p>How to find the constraint name of a particular Table at SQL SERVER 2005</p>
<p>Please Help Me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lalit</title>
		<link>http://blog.sqlauthority.com/2007/09/04/sql-server-2005-find-tables-with-primary-key-constraint-in-database/#comment-34425</link>
		<dc:creator>lalit</dc:creator>
		<pubDate>Tue, 18 Mar 2008 14:25:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/04/sql-server-2005-find-tables-with-primary-key-constraint-in-database/#comment-34425</guid>
		<description>hi 
i read about ur article do you know difference between 
rowlevel primary key and column level if yes send me an example of this also
thanks 
lalit bohra</description>
		<content:encoded><![CDATA[<p>hi<br />
i read about ur article do you know difference between<br />
rowlevel primary key and column level if yes send me an example of this also<br />
thanks<br />
lalit bohra</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mr Hollings</title>
		<link>http://blog.sqlauthority.com/2007/09/04/sql-server-2005-find-tables-with-primary-key-constraint-in-database/#comment-24150</link>
		<dc:creator>Mr Hollings</dc:creator>
		<pubDate>Mon, 03 Dec 2007 11:48:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/04/sql-server-2005-find-tables-with-primary-key-constraint-in-database/#comment-24150</guid>
		<description>Whilst the above may/does work for SQL2k5 ,
The following also works for SQL2k DB.

I had to crib this together because some of our processes are &#039;so generic&#039; they don;t know what table they&#039;ll be passed let alone what the primary key will be (for use in DML)

SELECT SC.Name, SC.COLID
FROM SYSOBJECTS SO 
	INNER JOIN SYSINDEXKEYS SI ON SO.ID = SI.ID AND SI.INDID = 1
	INNER JOIN SYSCOLUMNS SC ON SO.ID = SC.ID AND SC.COLID=SI.COLID
WHERE  SO.NAME= @MyTableName
AND SO.XTYPE=&#039;U&#039;

Corrections are welcome.</description>
		<content:encoded><![CDATA[<p>Whilst the above may/does work for SQL2k5 ,<br />
The following also works for SQL2k DB.</p>
<p>I had to crib this together because some of our processes are &#8217;so generic&#8217; they don;t know what table they&#8217;ll be passed let alone what the primary key will be (for use in DML)</p>
<p>SELECT SC.Name, SC.COLID<br />
FROM SYSOBJECTS SO<br />
	INNER JOIN SYSINDEXKEYS SI ON SO.ID = SI.ID AND SI.INDID = 1<br />
	INNER JOIN SYSCOLUMNS SC ON SO.ID = SC.ID AND SC.COLID=SI.COLID<br />
WHERE  SO.NAME= @MyTableName<br />
AND SO.XTYPE=&#8217;U&#8217;</p>
<p>Corrections are welcome.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: FAheem</title>
		<link>http://blog.sqlauthority.com/2007/09/04/sql-server-2005-find-tables-with-primary-key-constraint-in-database/#comment-19058</link>
		<dc:creator>FAheem</dc:creator>
		<pubDate>Mon, 12 Nov 2007 12:00:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/09/04/sql-server-2005-find-tables-with-primary-key-constraint-in-database/#comment-19058</guid>
		<description>hi 
grt query !
but i have a different question
i want to know whether i can delete a specfic record in sql server 2005 prior to execute the delete query.
mean if the record will have foreign key constraint and with the records child records will exists then db will not allow me to delete that record.
i want to know whether master table have child recrods or not
is there any query to do so ?
thanks in advance.
tgc
faheem</description>
		<content:encoded><![CDATA[<p>hi<br />
grt query !<br />
but i have a different question<br />
i want to know whether i can delete a specfic record in sql server 2005 prior to execute the delete query.<br />
mean if the record will have foreign key constraint and with the records child records will exists then db will not allow me to delete that record.<br />
i want to know whether master table have child recrods or not<br />
is there any query to do so ?<br />
thanks in advance.<br />
tgc<br />
faheem</p>
]]></content:encoded>
	</item>
</channel>
</rss>
