<?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; Create Primary Key with Specific Name when Creating Table</title>
	<atom:link href="http://blog.sqlauthority.com/2010/04/22/sql-server-create-primary-key-with-specific-name-when-creating-table/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2010/04/22/sql-server-create-primary-key-with-specific-name-when-creating-table/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Fri, 17 May 2013 15:26:57 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #026 &#124; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2010/04/22/sql-server-create-primary-key-with-specific-name-when-creating-table/#comment-464697</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #026 &#124; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Sat, 27 Apr 2013 01:31:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8655#comment-464697</guid>
		<description><![CDATA[[...] Create Primary Key with Specific Name when Creating Table Often primary keys are created with a default name and it is a good idea that we create primary keys with specific name so it helps readability and user can directly know lots of information if he/she is familiar with the naming convention. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Create Primary Key with Specific Name when Creating Table Often primary keys are created with a default name and it is a good idea that we create primary keys with specific name so it helps readability and user can directly know lots of information if he/she is familiar with the naming convention. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: janu</title>
		<link>http://blog.sqlauthority.com/2010/04/22/sql-server-create-primary-key-with-specific-name-when-creating-table/#comment-433965</link>
		<dc:creator><![CDATA[janu]]></dc:creator>
		<pubDate>Fri, 08 Mar 2013 16:28:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8655#comment-433965</guid>
		<description><![CDATA[how to set  primary key for email.id in  my registeration form.pls give me example]]></description>
		<content:encoded><![CDATA[<p>how to set  primary key for email.id in  my registeration form.pls give me example</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2010/04/22/sql-server-create-primary-key-with-specific-name-when-creating-table/#comment-422114</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Fri, 15 Feb 2013 12:59:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8655#comment-422114</guid>
		<description><![CDATA[You need to drop the contraint and then alter the datatype]]></description>
		<content:encoded><![CDATA[<p>You need to drop the contraint and then alter the datatype</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ganesh</title>
		<link>http://blog.sqlauthority.com/2010/04/22/sql-server-create-primary-key-with-specific-name-when-creating-table/#comment-421393</link>
		<dc:creator><![CDATA[ganesh]]></dc:creator>
		<pubDate>Wed, 13 Feb 2013 14:16:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8655#comment-421393</guid>
		<description><![CDATA[i hav a table 
 CREATE TABLE Table1(
Col1 INT NOT NULL,
Col2 VARCHAR(100)
CONSTRAINT PK_Table1_Col1 PRIMARY KEY  (Col1))
once table created i need to change id int to bigint how its possible]]></description>
		<content:encoded><![CDATA[<p>i hav a table<br />
 CREATE TABLE Table1(<br />
Col1 INT NOT NULL,<br />
Col2 VARCHAR(100)<br />
CONSTRAINT PK_Table1_Col1 PRIMARY KEY  (Col1))<br />
once table created i need to change id int to bigint how its possible</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ganesh</title>
		<link>http://blog.sqlauthority.com/2010/04/22/sql-server-create-primary-key-with-specific-name-when-creating-table/#comment-421392</link>
		<dc:creator><![CDATA[ganesh]]></dc:creator>
		<pubDate>Wed, 13 Feb 2013 14:13:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8655#comment-421392</guid>
		<description><![CDATA[how to alter primary key  column]]></description>
		<content:encoded><![CDATA[<p>how to alter primary key  column</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER &#8211; Fix Error: 8111 &#8211; Cannot define PRIMARY KEY constraint on nullable column in table &#8211; Error: 1750 &#8211; Could not create constraint. See previous errors &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2010/04/22/sql-server-create-primary-key-with-specific-name-when-creating-table/#comment-417411</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Fix Error: 8111 &#8211; Cannot define PRIMARY KEY constraint on nullable column in table &#8211; Error: 1750 &#8211; Could not create constraint. See previous errors &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Mon, 04 Feb 2013 01:30:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8655#comment-417411</guid>
		<description><![CDATA[[...] You can read about more about creating a Primary Key over here: SQL SERVER – Create Primary Key with Specific Name when Creating Table. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] You can read about more about creating a Primary Key over here: SQL SERVER – Create Primary Key with Specific Name when Creating Table. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: edu</title>
		<link>http://blog.sqlauthority.com/2010/04/22/sql-server-create-primary-key-with-specific-name-when-creating-table/#comment-395699</link>
		<dc:creator><![CDATA[edu]]></dc:creator>
		<pubDate>Tue, 18 Dec 2012 22:10:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8655#comment-395699</guid>
		<description><![CDATA[sorry but I have a problem with a create. Could you help me?

the query is:

CREATE TABLE Restaurante 
(
id INTEGER IDENTITY(1,1) PRIMARY KEY, 
nombre VARCHAR(60) NOT NULL, 
direccion VARCHAR(100) NOT NULL, 
coord_X FLOAT, 
coord_Y FLOAT,  
puntuacion FLOAT
);

I think that it&#039;s ok, but I have this mistake: ORA-00907: missing right parenthesis

How I can solve it?

thantk]]></description>
		<content:encoded><![CDATA[<p>sorry but I have a problem with a create. Could you help me?</p>
<p>the query is:</p>
<p>CREATE TABLE Restaurante<br />
(<br />
id INTEGER IDENTITY(1,1) PRIMARY KEY,<br />
nombre VARCHAR(60) NOT NULL,<br />
direccion VARCHAR(100) NOT NULL,<br />
coord_X FLOAT,<br />
coord_Y FLOAT,<br />
puntuacion FLOAT<br />
);</p>
<p>I think that it&#8217;s ok, but I have this mistake: ORA-00907: missing right parenthesis</p>
<p>How I can solve it?</p>
<p>thantk</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2010/04/22/sql-server-create-primary-key-with-specific-name-when-creating-table/#comment-302723</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Mon, 18 Jun 2012 08:21:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8655#comment-302723</guid>
		<description><![CDATA[Have you look at the CREATE table examples from SQL Server help file?]]></description>
		<content:encoded><![CDATA[<p>Have you look at the CREATE table examples from SQL Server help file?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lekshmi</title>
		<link>http://blog.sqlauthority.com/2010/04/22/sql-server-create-primary-key-with-specific-name-when-creating-table/#comment-300718</link>
		<dc:creator><![CDATA[lekshmi]]></dc:creator>
		<pubDate>Wed, 13 Jun 2012 05:12:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8655#comment-300718</guid>
		<description><![CDATA[sir,
i am a b.tech student and i want know to know how to set the primary key and foregin key when creating a table for doing my database lab.i read all the statements here,but we are creating the table using the query-create table table name (name varchar(10),...........................);-this may be a simple query for u..but please help me to insert the keys while creating tables....reply me sir]]></description>
		<content:encoded><![CDATA[<p>sir,<br />
i am a b.tech student and i want know to know how to set the primary key and foregin key when creating a table for doing my database lab.i read all the statements here,but we are creating the table using the query-create table table name (name varchar(10),&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;);-this may be a simple query for u..but please help me to insert the keys while creating tables&#8230;.reply me sir</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/2010/04/22/sql-server-create-primary-key-with-specific-name-when-creating-table/#comment-239872</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:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8655#comment-239872</guid>
		<description><![CDATA[[...] Prevent Constraint to Allow NULL Create 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 [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Prevent Constraint to Allow NULL Create 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 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Day 13 of 31 Journey to SQLAuthority</title>
		<link>http://blog.sqlauthority.com/2010/04/22/sql-server-create-primary-key-with-specific-name-when-creating-table/#comment-147832</link>
		<dc:creator><![CDATA[SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Day 13 of 31 Journey to SQLAuthority]]></dc:creator>
		<pubDate>Wed, 13 Jul 2011 01:30:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8655#comment-147832</guid>
		<description><![CDATA[[...] (Read more here) [...]]]></description>
		<content:encoded><![CDATA[<p>[...] (Read more here) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Krishna</title>
		<link>http://blog.sqlauthority.com/2010/04/22/sql-server-create-primary-key-with-specific-name-when-creating-table/#comment-102227</link>
		<dc:creator><![CDATA[Krishna]]></dc:creator>
		<pubDate>Fri, 26 Nov 2010 02:40:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8655#comment-102227</guid>
		<description><![CDATA[Hi All,
I am new to SQL Server and is working on a test task to create a database with related tables.
I have two tables -
1. First table has the Plant Names with their locations and addresses.
2. Second table has the performance metrics recorded every month. This means that the second table has repeating Plant Name (every month), RefYear (also repeating values) and RefMonth (also repetitive). The only criteria that each row is different from another is that Plant Name, RefYear and RefMonth are not identical for any two rows.

Do I have to assign a Primary Key for the second table? The Plant Name can be a Foreign Key relating to the Primary Key of the first table? In Access, the second table has the additional column of Primary Key which is an Autonumber.
I can add an additional column in the second table in the same lines as Access, but it does not relate to anything in the second table or other tables (e.g. Prime Mover type, Fuel etc) which I propose to add later.
Can I leave the second table without a Primary Key? Is it a good design? What are the alternatives?
I&#039;d appreciate for any suggestions.]]></description>
		<content:encoded><![CDATA[<p>Hi All,<br />
I am new to SQL Server and is working on a test task to create a database with related tables.<br />
I have two tables -<br />
1. First table has the Plant Names with their locations and addresses.<br />
2. Second table has the performance metrics recorded every month. This means that the second table has repeating Plant Name (every month), RefYear (also repeating values) and RefMonth (also repetitive). The only criteria that each row is different from another is that Plant Name, RefYear and RefMonth are not identical for any two rows.</p>
<p>Do I have to assign a Primary Key for the second table? The Plant Name can be a Foreign Key relating to the Primary Key of the first table? In Access, the second table has the additional column of Primary Key which is an Autonumber.<br />
I can add an additional column in the second table in the same lines as Access, but it does not relate to anything in the second table or other tables (e.g. Prime Mover type, Fuel etc) which I propose to add later.<br />
Can I leave the second table without a Primary Key? Is it a good design? What are the alternatives?<br />
I&#8217;d appreciate for any suggestions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Plocher</title>
		<link>http://blog.sqlauthority.com/2010/04/22/sql-server-create-primary-key-with-specific-name-when-creating-table/#comment-67693</link>
		<dc:creator><![CDATA[Adam Plocher]]></dc:creator>
		<pubDate>Thu, 29 Apr 2010 06:30:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8655#comment-67693</guid>
		<description><![CDATA[Creating a foreign key is very similar.

Instead of:
constraint [PK_PersonID] primary key (PersonID)

Use:
constraint [FK_Person_PersonType] foreign key (PersonTypeID) references PersonType(PersonTypeID)]]></description>
		<content:encoded><![CDATA[<p>Creating a foreign key is very similar.</p>
<p>Instead of:<br />
constraint [PK_PersonID] primary key (PersonID)</p>
<p>Use:<br />
constraint [FK_Person_PersonType] foreign key (PersonTypeID) references PersonType(PersonTypeID)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Deepak Sharma</title>
		<link>http://blog.sqlauthority.com/2010/04/22/sql-server-create-primary-key-with-specific-name-when-creating-table/#comment-66449</link>
		<dc:creator><![CDATA[Deepak Sharma]]></dc:creator>
		<pubDate>Fri, 23 Apr 2010 12:18:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8655#comment-66449</guid>
		<description><![CDATA[Dear Mr. Pinal,
I have a question which is not directly related with this topic, but there is some relationship with Primary key and Clustered Index. The question is:
	

I have a table &quot;TestIndex&quot;:

CREATE TABLE TestIndex
(
ID INT IDENTITY,
Name Nvarchar(100)
)
CREATE UNIQUE CLUSTERED INDEX MyIndex ON TestIndex(ID)

Now I run the following query:

SELECT * FROM sys.indexes WHERE object_id=object_id(&#039;TestIndex&#039;)

It will give me the information of Indexes on the table &quot;TestIndex&quot;. Now I write the following query to Add a Primary Key Constraint on the table &quot;TestIndex&quot; on Column ID:

ALTER TABLE  TestIndex
ADD CONSTRAINT MyKeyClustered PRIMARY KEY (ID)

Again When I run this quey:

SELECT * FROM sys.indexes WHERE object_id=object_id(&#039;TestIndex&#039;)

It will create a NonClustered Index Named: MyKeyClustered, and
EXECUTE sp_help TestIndex 
will give the information Primary key created on ID on NonClustered Index.
My question is this I don&#039;t want to create a NonClustered Index on my Primary Key Constraint, but I want to use the Clustered Index &quot;MyIndex&quot; on Primary Key Constraint. How I can do it?
Please help.]]></description>
		<content:encoded><![CDATA[<p>Dear Mr. Pinal,<br />
I have a question which is not directly related with this topic, but there is some relationship with Primary key and Clustered Index. The question is:</p>
<p>I have a table &#8220;TestIndex&#8221;:</p>
<p>CREATE TABLE TestIndex<br />
(<br />
ID INT IDENTITY,<br />
Name Nvarchar(100)<br />
)<br />
CREATE UNIQUE CLUSTERED INDEX MyIndex ON TestIndex(ID)</p>
<p>Now I run the following query:</p>
<p>SELECT * FROM sys.indexes WHERE object_id=object_id(&#8216;TestIndex&#8217;)</p>
<p>It will give me the information of Indexes on the table &#8220;TestIndex&#8221;. Now I write the following query to Add a Primary Key Constraint on the table &#8220;TestIndex&#8221; on Column ID:</p>
<p>ALTER TABLE  TestIndex<br />
ADD CONSTRAINT MyKeyClustered PRIMARY KEY (ID)</p>
<p>Again When I run this quey:</p>
<p>SELECT * FROM sys.indexes WHERE object_id=object_id(&#8216;TestIndex&#8217;)</p>
<p>It will create a NonClustered Index Named: MyKeyClustered, and<br />
EXECUTE sp_help TestIndex<br />
will give the information Primary key created on ID on NonClustered Index.<br />
My question is this I don&#8217;t want to create a NonClustered Index on my Primary Key Constraint, but I want to use the Clustered Index &#8220;MyIndex&#8221; on Primary Key Constraint. How I can do it?<br />
Please help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER – Update Statistics are Sampled By Default Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2010/04/22/sql-server-create-primary-key-with-specific-name-when-creating-table/#comment-66359</link>
		<dc:creator><![CDATA[SQL SERVER – Update Statistics are Sampled By Default Journey to SQL Authority with Pinal Dave]]></dc:creator>
		<pubDate>Fri, 23 Apr 2010 01:32:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8655#comment-66359</guid>
		<description><![CDATA[[...] 23, 2010 by pinaldave    After reading my earlier post SQL SERVER – Create Primary Key with Specific Name when Creating Table on Statistics, I have received another question by a blog reader. The question is as [...]]]></description>
		<content:encoded><![CDATA[<p>[...] 23, 2010 by pinaldave    After reading my earlier post SQL SERVER – Create Primary Key with Specific Name when Creating Table on Statistics, I have received another question by a blog reader. The question is as [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sajid</title>
		<link>http://blog.sqlauthority.com/2010/04/22/sql-server-create-primary-key-with-specific-name-when-creating-table/#comment-66189</link>
		<dc:creator><![CDATA[Sajid]]></dc:creator>
		<pubDate>Thu, 22 Apr 2010 10:36:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8655#comment-66189</guid>
		<description><![CDATA[Nutan,

Yes.. there is an option through SSMS as well.

In design mode, right click on Blank area, choose &quot;Index/Keys&quot; option from shortcut menus...Select the Index or Primary key in the list that you want to specify the name for... right side of the dialog you will see the option to set the name for it.

Once changed, close the dialog and save the changes... thats it.

Regards,
Sajid]]></description>
		<content:encoded><![CDATA[<p>Nutan,</p>
<p>Yes.. there is an option through SSMS as well.</p>
<p>In design mode, right click on Blank area, choose &#8220;Index/Keys&#8221; option from shortcut menus&#8230;Select the Index or Primary key in the list that you want to specify the name for&#8230; right side of the dialog you will see the option to set the name for it.</p>
<p>Once changed, close the dialog and save the changes&#8230; thats it.</p>
<p>Regards,<br />
Sajid</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nutan</title>
		<link>http://blog.sqlauthority.com/2010/04/22/sql-server-create-primary-key-with-specific-name-when-creating-table/#comment-66176</link>
		<dc:creator><![CDATA[Nutan]]></dc:creator>
		<pubDate>Thu, 22 Apr 2010 09:40:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8655#comment-66176</guid>
		<description><![CDATA[Hi,

 This is one of the new and interesting thing for me.

Again I do have one question. Is there any option to put custom name for constraint while creating a table from the design mode?]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p> This is one of the new and interesting thing for me.</p>
<p>Again I do have one question. Is there any option to put custom name for constraint while creating a table from the design mode?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anon</title>
		<link>http://blog.sqlauthority.com/2010/04/22/sql-server-create-primary-key-with-specific-name-when-creating-table/#comment-66168</link>
		<dc:creator><![CDATA[Anon]]></dc:creator>
		<pubDate>Thu, 22 Apr 2010 09:06:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8655#comment-66168</guid>
		<description><![CDATA[To the point and very accurate.]]></description>
		<content:encoded><![CDATA[<p>To the point and very accurate.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe Ramani</title>
		<link>http://blog.sqlauthority.com/2010/04/22/sql-server-create-primary-key-with-specific-name-when-creating-table/#comment-66167</link>
		<dc:creator><![CDATA[Joe Ramani]]></dc:creator>
		<pubDate>Thu, 22 Apr 2010 09:05:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8655#comment-66167</guid>
		<description><![CDATA[Something I was looking for today.

Thanks Dave]]></description>
		<content:encoded><![CDATA[<p>Something I was looking for today.</p>
<p>Thanks Dave</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/2010/04/22/sql-server-create-primary-key-with-specific-name-when-creating-table/#comment-66124</link>
		<dc:creator><![CDATA[pinaldave]]></dc:creator>
		<pubDate>Thu, 22 Apr 2010 06:25:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8655#comment-66124</guid>
		<description><![CDATA[Hi JamWheel,

Very good question. I think book online and SSMS can do lots of things.

It is about knowing various details. Knowledge various from people to people.

This blog post is for those who do not know the details.

Again, this is just a my opinion.

Kind Regards,
Pinal]]></description>
		<content:encoded><![CDATA[<p>Hi JamWheel,</p>
<p>Very good question. I think book online and SSMS can do lots of things.</p>
<p>It is about knowing various details. Knowledge various from people to people.</p>
<p>This blog post is for those who do not know the details.</p>
<p>Again, this is just a my opinion.</p>
<p>Kind Regards,<br />
Pinal</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/2010/04/22/sql-server-create-primary-key-with-specific-name-when-creating-table/#comment-66123</link>
		<dc:creator><![CDATA[pinaldave]]></dc:creator>
		<pubDate>Thu, 22 Apr 2010 06:23:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8655#comment-66123</guid>
		<description><![CDATA[Hi Sajid,

The missed comma is added. 

Appreciate your comment.

Kind Regards,
Pinal]]></description>
		<content:encoded><![CDATA[<p>Hi Sajid,</p>
<p>The missed comma is added. </p>
<p>Appreciate your comment.</p>
<p>Kind Regards,<br />
Pinal</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JamWheel</title>
		<link>http://blog.sqlauthority.com/2010/04/22/sql-server-create-primary-key-with-specific-name-when-creating-table/#comment-66121</link>
		<dc:creator><![CDATA[JamWheel]]></dc:creator>
		<pubDate>Thu, 22 Apr 2010 06:19:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8655#comment-66121</guid>
		<description><![CDATA[If you script a table in SSMS with default scripting options it includes the script to create the PK as per your 2nd example above.

Is this really blog worthy?]]></description>
		<content:encoded><![CDATA[<p>If you script a table in SSMS with default scripting options it includes the script to create the PK as per your 2nd example above.</p>
<p>Is this really blog worthy?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sajid</title>
		<link>http://blog.sqlauthority.com/2010/04/22/sql-server-create-primary-key-with-specific-name-when-creating-table/#comment-66094</link>
		<dc:creator><![CDATA[Sajid]]></dc:creator>
		<pubDate>Thu, 22 Apr 2010 04:03:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8655#comment-66094</guid>
		<description><![CDATA[Hi Pinal... with first look on your query to create the primary key with specific name, I smelled syntax problem (Even though I was certain that you must had tested the query before posting) as we always use to have comma (,) before CONSTRAINT Keyword.

Wondered that both works :) - check below query

CREATE TABLE [dbo].[TestTable1](
[ID] [int] IDENTITY(1,1) NOT NULL,
[FirstName] [varchar](100) NULL,
CONSTRAINT [PK_TestTable1] PRIMARY KEY CLUSTERED
([ID] ASC)
)


In case only one column is candidate for primary key there is another way to have constraint with name in Create table statement (as below)... 

CREATE TABLE [dbo].[TestTable2](
[ID] [int] IDENTITY(1,1) NOT NULL CONSTRAINT [PK_TestTable2] PRIMARY KEY CLUSTERED,
[FirstName] [varchar](100) NULL
)

Just to have all possibilities together.

Regards,
Sajid]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal&#8230; with first look on your query to create the primary key with specific name, I smelled syntax problem (Even though I was certain that you must had tested the query before posting) as we always use to have comma (,) before CONSTRAINT Keyword.</p>
<p>Wondered that both works :) &#8211; check below query</p>
<p>CREATE TABLE [dbo].[TestTable1](<br />
[ID] [int] IDENTITY(1,1) NOT NULL,<br />
[FirstName] [varchar](100) NULL,<br />
CONSTRAINT [PK_TestTable1] PRIMARY KEY CLUSTERED<br />
([ID] ASC)<br />
)</p>
<p>In case only one column is candidate for primary key there is another way to have constraint with name in Create table statement (as below)&#8230; </p>
<p>CREATE TABLE [dbo].[TestTable2](<br />
[ID] [int] IDENTITY(1,1) NOT NULL CONSTRAINT [PK_TestTable2] PRIMARY KEY CLUSTERED,<br />
[FirstName] [varchar](100) NULL<br />
)</p>
<p>Just to have all possibilities together.</p>
<p>Regards,<br />
Sajid</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/2010/04/22/sql-server-create-primary-key-with-specific-name-when-creating-table/#comment-66077</link>
		<dc:creator><![CDATA[pinaldave]]></dc:creator>
		<pubDate>Thu, 22 Apr 2010 01:58:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8655#comment-66077</guid>
		<description><![CDATA[Thank You Noel

For additional link to book online.

Kind Regards,
Pinal]]></description>
		<content:encoded><![CDATA[<p>Thank You Noel</p>
<p>For additional link to book online.</p>
<p>Kind Regards,<br />
Pinal</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Noel</title>
		<link>http://blog.sqlauthority.com/2010/04/22/sql-server-create-primary-key-with-specific-name-when-creating-table/#comment-66074</link>
		<dc:creator><![CDATA[Noel]]></dc:creator>
		<pubDate>Thu, 22 Apr 2010 01:46:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8655#comment-66074</guid>
		<description><![CDATA[Did you tell the reader that this is in Books Online?

http://technet.microsoft.com/en-us/library/ms174979.aspx

Example &quot;F&quot; even has a CREATE TABLE example where the primary key is named.]]></description>
		<content:encoded><![CDATA[<p>Did you tell the reader that this is in Books Online?</p>
<p><a href="http://technet.microsoft.com/en-us/library/ms174979.aspx" rel="nofollow">http://technet.microsoft.com/en-us/library/ms174979.aspx</a></p>
<p>Example &#8220;F&#8221; even has a CREATE TABLE example where the primary key is named.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
