<?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; 2008 &#8211; Creating Primary Key, Foreign Key and Default Constraint</title>
	<atom:link href="http://blog.sqlauthority.com/2008/09/08/sql-server-%e2%80%93-2008-creating-primary-key-foreign-key-and-default-constraint/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2008/09/08/sql-server-%e2%80%93-2008-creating-primary-key-foreign-key-and-default-constraint/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Mon, 13 Feb 2012 15:11:24 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Sharan Chakradhar</title>
		<link>http://blog.sqlauthority.com/2008/09/08/sql-server-%e2%80%93-2008-creating-primary-key-foreign-key-and-default-constraint/#comment-247533</link>
		<dc:creator><![CDATA[Sharan Chakradhar]]></dc:creator>
		<pubDate>Fri, 03 Feb 2012 14:07:42 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1045#comment-247533</guid>
		<description><![CDATA[How do I fetch MAC address in SQL server to implement in triggers.]]></description>
		<content:encoded><![CDATA[<p>How do I fetch MAC address in SQL server to implement in triggers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER &#8211; Various Ways to Create Constraints &#8211; Quiz &#8211; Puzzle &#8211; 17 of 31 &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2008/09/08/sql-server-%e2%80%93-2008-creating-primary-key-foreign-key-and-default-constraint/#comment-239873</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Various Ways to Create Constraints &#8211; Quiz &#8211; Puzzle &#8211; 17 of 31 &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Wed, 18 Jan 2012 01:31:44 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1045#comment-239873</guid>
		<description><![CDATA[[...] Default Constraint Over Table Column Create Primary Key with Specific Name when Creating Table Creating Primary Key, Foreign Key and Default Constraint How to ALTER CONSTRAINT Disable CHECK Constraint – Enable CHECK Constraint Query to Display [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Default Constraint Over Table Column Create Primary Key with Specific Name when Creating Table Creating Primary Key, Foreign Key and Default Constraint How to ALTER CONSTRAINT Disable CHECK Constraint – Enable CHECK Constraint Query to Display [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vipin kumar</title>
		<link>http://blog.sqlauthority.com/2008/09/08/sql-server-%e2%80%93-2008-creating-primary-key-foreign-key-and-default-constraint/#comment-239184</link>
		<dc:creator><![CDATA[vipin kumar]]></dc:creator>
		<pubDate>Tue, 17 Jan 2012 07:40:39 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1045#comment-239184</guid>
		<description><![CDATA[window authentication mode used when you use your application with your system and sql server authentication is used when multiple application used a centrally database .]]></description>
		<content:encoded><![CDATA[<p>window authentication mode used when you use your application with your system and sql server authentication is used when multiple application used a centrally database .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2008/09/08/sql-server-%e2%80%93-2008-creating-primary-key-foreign-key-and-default-constraint/#comment-218524</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Thu, 15 Dec 2011 14:36:39 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1045#comment-218524</guid>
		<description><![CDATA[You can do it in INSERT and UPDATE statements]]></description>
		<content:encoded><![CDATA[<p>You can do it in INSERT and UPDATE statements</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Avinash Patil</title>
		<link>http://blog.sqlauthority.com/2008/09/08/sql-server-%e2%80%93-2008-creating-primary-key-foreign-key-and-default-constraint/#comment-215849</link>
		<dc:creator><![CDATA[Avinash Patil]]></dc:creator>
		<pubDate>Mon, 12 Dec 2011 06:56:59 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1045#comment-215849</guid>
		<description><![CDATA[Hi sir,
My question is-
In sql server authentication mode which is more secure authentication? (Windows or Sql server)]]></description>
		<content:encoded><![CDATA[<p>Hi sir,<br />
My question is-<br />
In sql server authentication mode which is more secure authentication? (Windows or Sql server)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dharmesh</title>
		<link>http://blog.sqlauthority.com/2008/09/08/sql-server-%e2%80%93-2008-creating-primary-key-foreign-key-and-default-constraint/#comment-213834</link>
		<dc:creator><![CDATA[dharmesh]]></dc:creator>
		<pubDate>Fri, 09 Dec 2011 04:40:33 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1045#comment-213834</guid>
		<description><![CDATA[how to insert a manual int value in primary key , sql server 2008]]></description>
		<content:encoded><![CDATA[<p>how to insert a manual int value in primary key , sql server 2008</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brent</title>
		<link>http://blog.sqlauthority.com/2008/09/08/sql-server-%e2%80%93-2008-creating-primary-key-foreign-key-and-default-constraint/#comment-212123</link>
		<dc:creator><![CDATA[Brent]]></dc:creator>
		<pubDate>Tue, 06 Dec 2011 14:58:21 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1045#comment-212123</guid>
		<description><![CDATA[Thank you, always seem to forget the exact syntax on many of those.]]></description>
		<content:encoded><![CDATA[<p>Thank you, always seem to forget the exact syntax on many of those.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tha</title>
		<link>http://blog.sqlauthority.com/2008/09/08/sql-server-%e2%80%93-2008-creating-primary-key-foreign-key-and-default-constraint/#comment-175946</link>
		<dc:creator><![CDATA[Tha]]></dc:creator>
		<pubDate>Fri, 07 Oct 2011 03:29:14 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1045#comment-175946</guid>
		<description><![CDATA[Thanks for your post.]]></description>
		<content:encoded><![CDATA[<p>Thanks for your post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pankaj</title>
		<link>http://blog.sqlauthority.com/2008/09/08/sql-server-%e2%80%93-2008-creating-primary-key-foreign-key-and-default-constraint/#comment-172770</link>
		<dc:creator><![CDATA[Pankaj]]></dc:creator>
		<pubDate>Wed, 28 Sep 2011 10:31:32 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1045#comment-172770</guid>
		<description><![CDATA[Your posts are really usefull]]></description>
		<content:encoded><![CDATA[<p>Your posts are really usefull</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richardm</title>
		<link>http://blog.sqlauthority.com/2008/09/08/sql-server-%e2%80%93-2008-creating-primary-key-foreign-key-and-default-constraint/#comment-168468</link>
		<dc:creator><![CDATA[Richardm]]></dc:creator>
		<pubDate>Thu, 15 Sep 2011 19:26:14 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1045#comment-168468</guid>
		<description><![CDATA[Greetings Pinal - Always find your answers helpful and spot on.  At the moment I&#039;m stuck in SQL/Server hell and can&#039;t find a solution. I have a table that I can&#039;t drop, can&#039;t truncate, can&#039;t do anything with because of this message &quot;it is being used for foreign key constraint enforcement.&quot;  I have dropped ALL of the constraints on the table, and still can&#039;t get around this error.  There is a unique index that is being referenced that can&#039;t be dropped either because of the same error response.  I&#039;m stuck in a circular hell.  How do I get out of hell with this table?]]></description>
		<content:encoded><![CDATA[<p>Greetings Pinal &#8211; Always find your answers helpful and spot on.  At the moment I&#8217;m stuck in SQL/Server hell and can&#8217;t find a solution. I have a table that I can&#8217;t drop, can&#8217;t truncate, can&#8217;t do anything with because of this message &#8220;it is being used for foreign key constraint enforcement.&#8221;  I have dropped ALL of the constraints on the table, and still can&#8217;t get around this error.  There is a unique index that is being referenced that can&#8217;t be dropped either because of the same error response.  I&#8217;m stuck in a circular hell.  How do I get out of hell with this table?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yosepkurniawijaya</title>
		<link>http://blog.sqlauthority.com/2008/09/08/sql-server-%e2%80%93-2008-creating-primary-key-foreign-key-and-default-constraint/#comment-166854</link>
		<dc:creator><![CDATA[yosepkurniawijaya]]></dc:creator>
		<pubDate>Fri, 09 Sep 2011 15:37:59 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1045#comment-166854</guid>
		<description><![CDATA[Hi, greeting from Indonesia. I&#039;ve been looking for script of creating a foreign key related to the primary key from the column level and your explanation was great. Thank you very much! God bless]]></description>
		<content:encoded><![CDATA[<p>Hi, greeting from Indonesia. I&#8217;ve been looking for script of creating a foreign key related to the primary key from the column level and your explanation was great. Thank you very much! God bless</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2008/09/08/sql-server-%e2%80%93-2008-creating-primary-key-foreign-key-and-default-constraint/#comment-166810</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Fri, 09 Sep 2011 10:59:09 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1045#comment-166810</guid>
		<description><![CDATA[It is a single primary key combined on many columns. You cannot create primary key on each column seperately.]]></description>
		<content:encoded><![CDATA[<p>It is a single primary key combined on many columns. You cannot create primary key on each column seperately.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Madhu</title>
		<link>http://blog.sqlauthority.com/2008/09/08/sql-server-%e2%80%93-2008-creating-primary-key-foreign-key-and-default-constraint/#comment-166401</link>
		<dc:creator><![CDATA[Madhu]]></dc:creator>
		<pubDate>Thu, 08 Sep 2011 03:55:12 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1045#comment-166401</guid>
		<description><![CDATA[Hi madhivanan,

we can create more than one primary key we can call it as composite key..]]></description>
		<content:encoded><![CDATA[<p>Hi madhivanan,</p>
<p>we can create more than one primary key we can call it as composite key..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2008/09/08/sql-server-%e2%80%93-2008-creating-primary-key-foreign-key-and-default-constraint/#comment-166249</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Wed, 07 Sep 2011 13:46:45 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1045#comment-166249</guid>
		<description><![CDATA[Note that there cannot be more than one primary key in a table]]></description>
		<content:encoded><![CDATA[<p>Note that there cannot be more than one primary key in a table</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Madhu</title>
		<link>http://blog.sqlauthority.com/2008/09/08/sql-server-%e2%80%93-2008-creating-primary-key-foreign-key-and-default-constraint/#comment-166188</link>
		<dc:creator><![CDATA[Madhu]]></dc:creator>
		<pubDate>Wed, 07 Sep 2011 09:42:45 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1045#comment-166188</guid>
		<description><![CDATA[Hi Mr. Pinal,

One table having one cluster Index in the case of one primary key. If more than one primary keys are there in a table, then how many clustered Indexes are created for table?

Please reply me......

Thanks &amp; Regards
Madhu....]]></description>
		<content:encoded><![CDATA[<p>Hi Mr. Pinal,</p>
<p>One table having one cluster Index in the case of one primary key. If more than one primary keys are there in a table, then how many clustered Indexes are created for table?</p>
<p>Please reply me&#8230;&#8230;</p>
<p>Thanks &amp; Regards<br />
Madhu&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rama chandra sahu</title>
		<link>http://blog.sqlauthority.com/2008/09/08/sql-server-%e2%80%93-2008-creating-primary-key-foreign-key-and-default-constraint/#comment-163172</link>
		<dc:creator><![CDATA[rama chandra sahu]]></dc:creator>
		<pubDate>Mon, 29 Aug 2011 10:08:34 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1045#comment-163172</guid>
		<description><![CDATA[Can&#039;t we create a default constraint at table level ???]]></description>
		<content:encoded><![CDATA[<p>Can&#8217;t we create a default constraint at table level ???</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dinesh</title>
		<link>http://blog.sqlauthority.com/2008/09/08/sql-server-%e2%80%93-2008-creating-primary-key-foreign-key-and-default-constraint/#comment-162200</link>
		<dc:creator><![CDATA[Dinesh]]></dc:creator>
		<pubDate>Fri, 26 Aug 2011 10:40:26 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1045#comment-162200</guid>
		<description><![CDATA[HAI,
I want learn SQL more.Is any way to understand SQL easely.
REGARDS
Dinesh]]></description>
		<content:encoded><![CDATA[<p>HAI,<br />
I want learn SQL more.Is any way to understand SQL easely.<br />
REGARDS<br />
Dinesh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ram</title>
		<link>http://blog.sqlauthority.com/2008/09/08/sql-server-%e2%80%93-2008-creating-primary-key-foreign-key-and-default-constraint/#comment-154096</link>
		<dc:creator><![CDATA[ram]]></dc:creator>
		<pubDate>Fri, 05 Aug 2011 11:18:32 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1045#comment-154096</guid>
		<description><![CDATA[first you have to create one table  then --.&gt; go to stored procedure --&gt;
and write code like a 

create procedure [procedure_name]
(
declare variables
[while u declare a variable start with &#039; @ &#039; and end with ,]
example
@name nvarchar(50)]]></description>
		<content:encoded><![CDATA[<p>first you have to create one table  then &#8211;.&gt; go to stored procedure &#8211;&gt;<br />
and write code like a </p>
<p>create procedure [procedure_name]<br />
(<br />
declare variables<br />
[while u declare a variable start with ' @ ' and end with ,]<br />
example<br />
@name nvarchar(50)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ram</title>
		<link>http://blog.sqlauthority.com/2008/09/08/sql-server-%e2%80%93-2008-creating-primary-key-foreign-key-and-default-constraint/#comment-154094</link>
		<dc:creator><![CDATA[ram]]></dc:creator>
		<pubDate>Fri, 05 Aug 2011 11:04:38 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1045#comment-154094</guid>
		<description><![CDATA[try to chage your main table unique key bcoz unique key access from the null values so try to use primary key then u il set the foreign key ur table]]></description>
		<content:encoded><![CDATA[<p>try to chage your main table unique key bcoz unique key access from the null values so try to use primary key then u il set the foreign key ur table</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ram</title>
		<link>http://blog.sqlauthority.com/2008/09/08/sql-server-%e2%80%93-2008-creating-primary-key-foreign-key-and-default-constraint/#comment-154093</link>
		<dc:creator><![CDATA[ram]]></dc:creator>
		<pubDate>Fri, 05 Aug 2011 10:58:21 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1045#comment-154093</guid>
		<description><![CDATA[can anyone help me!!!
when ever i create identity primary key tat error showing all the times  

&quot;Must declare the scalar variable &quot;@&quot;ID&quot;]]></description>
		<content:encoded><![CDATA[<p>can anyone help me!!!<br />
when ever i create identity primary key tat error showing all the times  </p>
<p>&#8220;Must declare the scalar variable &#8220;@&#8221;ID&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: manoj bhatt</title>
		<link>http://blog.sqlauthority.com/2008/09/08/sql-server-%e2%80%93-2008-creating-primary-key-foreign-key-and-default-constraint/#comment-135063</link>
		<dc:creator><![CDATA[manoj bhatt]]></dc:creator>
		<pubDate>Wed, 18 May 2011 19:51:08 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1045#comment-135063</guid>
		<description><![CDATA[dear sir,
              i have a table called student_ id with 3 column id(pkey),name and course.

i wants to access id (start with 3 and end with 8,means 5 values)
hw can this is possible with asp.net application]]></description>
		<content:encoded><![CDATA[<p>dear sir,<br />
              i have a table called student_ id with 3 column id(pkey),name and course.</p>
<p>i wants to access id (start with 3 and end with 8,means 5 values)<br />
hw can this is possible with asp.net application</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: manoj bhatt</title>
		<link>http://blog.sqlauthority.com/2008/09/08/sql-server-%e2%80%93-2008-creating-primary-key-foreign-key-and-default-constraint/#comment-134150</link>
		<dc:creator><![CDATA[manoj bhatt]]></dc:creator>
		<pubDate>Thu, 12 May 2011 18:21:20 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1045#comment-134150</guid>
		<description><![CDATA[i am now satisfy with ur answer

thanks]]></description>
		<content:encoded><![CDATA[<p>i am now satisfy with ur answer</p>
<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sravanthi</title>
		<link>http://blog.sqlauthority.com/2008/09/08/sql-server-%e2%80%93-2008-creating-primary-key-foreign-key-and-default-constraint/#comment-127869</link>
		<dc:creator><![CDATA[sravanthi]]></dc:creator>
		<pubDate>Sat, 09 Apr 2011 05:24:47 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1045#comment-127869</guid>
		<description><![CDATA[Hi Pinal Sir,
     I hava a problem in creating foreign key in my sql  table.im using sql 2008.
 Can i set two  foreign keys in two child tables  with references to one unique key in main table .
pleas help me.]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal Sir,<br />
     I hava a problem in creating foreign key in my sql  table.im using sql 2008.<br />
 Can i set two  foreign keys in two child tables  with references to one unique key in main table .<br />
pleas help me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ramakrishna</title>
		<link>http://blog.sqlauthority.com/2008/09/08/sql-server-%e2%80%93-2008-creating-primary-key-foreign-key-and-default-constraint/#comment-127843</link>
		<dc:creator><![CDATA[ramakrishna]]></dc:creator>
		<pubDate>Sat, 09 Apr 2011 03:15:25 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1045#comment-127843</guid>
		<description><![CDATA[Hi Pinal
I create salespeople table 
create table salespeople(snum int CONSTRAINT pk_snum PRIMARY KEY,sname varchar(50),city varchar(50),comm decimal(12))
i inserted data like this
insert into salespeople values(1002,&#039;bama&#039;,&#039;bangalore&#039;,.18)
insert into salespeople values(1003,&#039;kama&#039;,&#039;Bobbili&#039;,.15)
insert into salespeople values(1004,&#039;anjuri&#039;,&#039;vizag&#039;,.14)
----------------------
then i create customer table
create table customer(cnum int INT CONSTRAINT pk_productSales_sid PRIMARY KEY,
Cname varchar(50),
city varchar(50),rating int ,
snum int CONSTRAINT fk_snum_pid FOREIGN KEY REFERENCES salespeople(snum))
inser values
insert into customer values(200,&#039;jayanth&#039;,&#039;bangalore&#039;,100,1004)
insert into customer values(2005,&#039;bhagyasri&#039;,&#039;guntur&#039;,200,1006)
----------------
i create order table
create table orders(onum int CONSTRAINT pk_productSales_sid PRIMARY KEY,
amount decimal(10),Orderdate datetime,
snum int CONSTRAINT fk_snum2_pid FOREIGN KEY REFERENCES salespeople(snum),
cnum int CONSTRAINT fk_cnum_pid FOREIGN KEY REFERENCES customer(cnum))

i got the error
Msg 2714, Level 16, State 4, Line 1
There is already an object named &#039;fk_snum_pid&#039; in the database.
Msg 1750, Level 16, State 0, Line 1
Could not create constraint. See previous errors.

How to solve those errors 
plz send details urgent pinla]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal<br />
I create salespeople table<br />
create table salespeople(snum int CONSTRAINT pk_snum PRIMARY KEY,sname varchar(50),city varchar(50),comm decimal(12))<br />
i inserted data like this<br />
insert into salespeople values(1002,&#8217;bama&#8217;,'bangalore&#8217;,.18)<br />
insert into salespeople values(1003,&#8217;kama&#8217;,'Bobbili&#8217;,.15)<br />
insert into salespeople values(1004,&#8217;anjuri&#8217;,'vizag&#8217;,.14)<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
then i create customer table<br />
create table customer(cnum int INT CONSTRAINT pk_productSales_sid PRIMARY KEY,<br />
Cname varchar(50),<br />
city varchar(50),rating int ,<br />
snum int CONSTRAINT fk_snum_pid FOREIGN KEY REFERENCES salespeople(snum))<br />
inser values<br />
insert into customer values(200,&#8217;jayanth&#8217;,'bangalore&#8217;,100,1004)<br />
insert into customer values(2005,&#8217;bhagyasri&#8217;,'guntur&#8217;,200,1006)<br />
&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
i create order table<br />
create table orders(onum int CONSTRAINT pk_productSales_sid PRIMARY KEY,<br />
amount decimal(10),Orderdate datetime,<br />
snum int CONSTRAINT fk_snum2_pid FOREIGN KEY REFERENCES salespeople(snum),<br />
cnum int CONSTRAINT fk_cnum_pid FOREIGN KEY REFERENCES customer(cnum))</p>
<p>i got the error<br />
Msg 2714, Level 16, State 4, Line 1<br />
There is already an object named &#8216;fk_snum_pid&#8217; in the database.<br />
Msg 1750, Level 16, State 0, Line 1<br />
Could not create constraint. See previous errors.</p>
<p>How to solve those errors<br />
plz send details urgent pinla</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nidhi Dave</title>
		<link>http://blog.sqlauthority.com/2008/09/08/sql-server-%e2%80%93-2008-creating-primary-key-foreign-key-and-default-constraint/#comment-123590</link>
		<dc:creator><![CDATA[Nidhi Dave]]></dc:creator>
		<pubDate>Thu, 17 Mar 2011 05:22:27 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1045#comment-123590</guid>
		<description><![CDATA[Hello
Pinal

Your posts are really very helpful 
thank you]]></description>
		<content:encoded><![CDATA[<p>Hello<br />
Pinal</p>
<p>Your posts are really very helpful<br />
thank you</p>
]]></content:encoded>
	</item>
</channel>
</rss>

