<?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; Three T-SQL Script to Create Primary Keys on Table</title>
	<atom:link href="http://blog.sqlauthority.com/2007/10/16/sql-server-three-t-sql-script-to-create-primary-keys-on-table/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2007/10/16/sql-server-three-t-sql-script-to-create-primary-keys-on-table/</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: SQLAuthority News - Best Articles on SQLAuthority.com Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2007/10/16/sql-server-three-t-sql-script-to-create-primary-keys-on-table/#comment-47254</link>
		<dc:creator>SQLAuthority News - Best Articles on SQLAuthority.com Journey to SQL Authority with Pinal Dave</dc:creator>
		<pubDate>Tue, 24 Feb 2009 12:11:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/10/16/sql-server-three-t-sql-script-to-create-primary-keys-on-table/#comment-47254</guid>
		<description>[...] SQL SERVER - Three T-SQL Script to Create Primary Keys on Table [...]</description>
		<content:encoded><![CDATA[<p>[...] SQL SERVER &#8211; Three T-SQL Script to Create Primary Keys on Table [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Imran Mohammed</title>
		<link>http://blog.sqlauthority.com/2007/10/16/sql-server-three-t-sql-script-to-create-primary-keys-on-table/#comment-45719</link>
		<dc:creator>Imran Mohammed</dc:creator>
		<pubDate>Mon, 19 Jan 2009 04:50:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/10/16/sql-server-three-t-sql-script-to-create-primary-keys-on-table/#comment-45719</guid>
		<description>@Zubair.

There are only few situations where you can add a column 
1. With not null contraint 
2. With no default constraint.

First of all this does not even make sense to do something like this, it will definitely not have any business value. 

Anyways here are these two ways to do it.

1. Definitely you can add a column to a table , with not null and not default constraint, but the table has to be empty. There has to be no data in the table, this can be done with T-SQL Script.

2. If you have data in the table and you still want to add a column with not null constraint and with out default constraint. You can add an identity column, unfortunately you cannot add an identity column with T-SQL script , you have to use SSMS.

If you say, No, I have data already in the table, and still want to add a column to the table with not null, not default constraint, then you decide what values should go into previous records for this new column ???

Think logically 

Hope this helps,
IM.</description>
		<content:encoded><![CDATA[<p>@Zubair.</p>
<p>There are only few situations where you can add a column<br />
1. With not null contraint<br />
2. With no default constraint.</p>
<p>First of all this does not even make sense to do something like this, it will definitely not have any business value. </p>
<p>Anyways here are these two ways to do it.</p>
<p>1. Definitely you can add a column to a table , with not null and not default constraint, but the table has to be empty. There has to be no data in the table, this can be done with T-SQL Script.</p>
<p>2. If you have data in the table and you still want to add a column with not null constraint and with out default constraint. You can add an identity column, unfortunately you cannot add an identity column with T-SQL script , you have to use SSMS.</p>
<p>If you say, No, I have data already in the table, and still want to add a column to the table with not null, not default constraint, then you decide what values should go into previous records for this new column ???</p>
<p>Think logically </p>
<p>Hope this helps,<br />
IM.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ZUBAIR ALAM</title>
		<link>http://blog.sqlauthority.com/2007/10/16/sql-server-three-t-sql-script-to-create-primary-keys-on-table/#comment-45708</link>
		<dc:creator>ZUBAIR ALAM</dc:creator>
		<pubDate>Sun, 18 Jan 2009 16:59:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/10/16/sql-server-three-t-sql-script-to-create-primary-keys-on-table/#comment-45708</guid>
		<description>hello pinal sir,

i want to add a column of NOT NULL type using ALTER TABLE statement 
how can i do it.
also i want to add this column without default constraint
waiting for ur reply 
thanks in advance!!!!!!!</description>
		<content:encoded><![CDATA[<p>hello pinal sir,</p>
<p>i want to add a column of NOT NULL type using ALTER TABLE statement<br />
how can i do it.<br />
also i want to add this column without default constraint<br />
waiting for ur reply<br />
thanks in advance!!!!!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karthick</title>
		<link>http://blog.sqlauthority.com/2007/10/16/sql-server-three-t-sql-script-to-create-primary-keys-on-table/#comment-41823</link>
		<dc:creator>Karthick</dc:creator>
		<pubDate>Wed, 20 Aug 2008 13:25:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/10/16/sql-server-three-t-sql-script-to-create-primary-keys-on-table/#comment-41823</guid>
		<description>hello sir
                        I have plan to  do some project in inventary model for this I have created my database in sql 2005 as by back-end and c#.net is my front end for this i would like to know difference between the sql scripting language and ordinary database language plz help me..............</description>
		<content:encoded><![CDATA[<p>hello sir<br />
                        I have plan to  do some project in inventary model for this I have created my database in sql 2005 as by back-end and c#.net is my front end for this i would like to know difference between the sql scripting language and ordinary database language plz help me&#8230;&#8230;&#8230;&#8230;..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kiran</title>
		<link>http://blog.sqlauthority.com/2007/10/16/sql-server-three-t-sql-script-to-create-primary-keys-on-table/#comment-31731</link>
		<dc:creator>kiran</dc:creator>
		<pubDate>Tue, 08 Jan 2008 13:09:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/10/16/sql-server-three-t-sql-script-to-create-primary-keys-on-table/#comment-31731</guid>
		<description>it is very useful to beginers</description>
		<content:encoded><![CDATA[<p>it is very useful to beginers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Russell</title>
		<link>http://blog.sqlauthority.com/2007/10/16/sql-server-three-t-sql-script-to-create-primary-keys-on-table/#comment-19902</link>
		<dc:creator>Russell</dc:creator>
		<pubDate>Thu, 15 Nov 2007 04:06:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/10/16/sql-server-three-t-sql-script-to-create-primary-keys-on-table/#comment-19902</guid>
		<description>Thanks :-)</description>
		<content:encoded><![CDATA[<p>Thanks :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vaibhav</title>
		<link>http://blog.sqlauthority.com/2007/10/16/sql-server-three-t-sql-script-to-create-primary-keys-on-table/#comment-17114</link>
		<dc:creator>vaibhav</dc:creator>
		<pubDate>Fri, 02 Nov 2007 07:31:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/10/16/sql-server-three-t-sql-script-to-create-primary-keys-on-table/#comment-17114</guid>
		<description>ur Advice is Valuable...DBA
ur Advice is Valuable...DBA
Do let me know presently m working in a bank as a Datavbase Administrator for Sql server 2005 though i dont have very much to do even nothing to explore my skills here .../.... i m trying to move on to devlopement company as soon as possible here i feel like standstill ......meanwhile do u think that i shud carry on with this job look though i m learning -----------indexing,Physical and logical data modeling-----Performance tunning of Queris and Database ,clustring knowledge.Troubleshooting of Queris and Procedures. at my own skills.....m only doing some backup statgies automating backup&#039;s and maintainance plan and Using Dbcc commands replication and mirroring etc...

Do you think that it ll count as a experience for switching off to next company....



Please Plea advice me ......


Vaibhav mathur</description>
		<content:encoded><![CDATA[<p>ur Advice is Valuable&#8230;DBA<br />
ur Advice is Valuable&#8230;DBA<br />
Do let me know presently m working in a bank as a Datavbase Administrator for Sql server 2005 though i dont have very much to do even nothing to explore my skills here &#8230;/&#8230;. i m trying to move on to devlopement company as soon as possible here i feel like standstill &#8230;&#8230;meanwhile do u think that i shud carry on with this job look though i m learning &#8212;&#8212;&#8212;&#8211;indexing,Physical and logical data modeling&#8212;&#8211;Performance tunning of Queris and Database ,clustring knowledge.Troubleshooting of Queris and Procedures. at my own skills&#8230;..m only doing some backup statgies automating backup&#8217;s and maintainance plan and Using Dbcc commands replication and mirroring etc&#8230;</p>
<p>Do you think that it ll count as a experience for switching off to next company&#8230;.</p>
<p>Please Plea advice me &#8230;&#8230;</p>
<p>Vaibhav mathur</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ashutosh</title>
		<link>http://blog.sqlauthority.com/2007/10/16/sql-server-three-t-sql-script-to-create-primary-keys-on-table/#comment-16974</link>
		<dc:creator>Ashutosh</dc:creator>
		<pubDate>Thu, 01 Nov 2007 06:46:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/10/16/sql-server-three-t-sql-script-to-create-primary-keys-on-table/#comment-16974</guid>
		<description>Hello Sir,

Wish U Very Very Happy Diwali

I Am Ashutosh Here Sir I Also Become a MCTS.Net &amp; DBA so please can U Suggest Me Which books i should be read  

Thank You Sir
Ashutosh Bagul</description>
		<content:encoded><![CDATA[<p>Hello Sir,</p>
<p>Wish U Very Very Happy Diwali</p>
<p>I Am Ashutosh Here Sir I Also Become a MCTS.Net &amp; DBA so please can U Suggest Me Which books i should be read  </p>
<p>Thank You Sir<br />
Ashutosh Bagul</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amit Srivastrava</title>
		<link>http://blog.sqlauthority.com/2007/10/16/sql-server-three-t-sql-script-to-create-primary-keys-on-table/#comment-16378</link>
		<dc:creator>Amit Srivastrava</dc:creator>
		<pubDate>Thu, 25 Oct 2007 12:19:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/10/16/sql-server-three-t-sql-script-to-create-primary-keys-on-table/#comment-16378</guid>
		<description>Hello Sir,

I am an aspiring DBA can u pls suggest me a book from where i can learn to administer both SQL Server 2005 and Oracle.

Thanking you in advance.

Amit</description>
		<content:encoded><![CDATA[<p>Hello Sir,</p>
<p>I am an aspiring DBA can u pls suggest me a book from where i can learn to administer both SQL Server 2005 and Oracle.</p>
<p>Thanking you in advance.</p>
<p>Amit</p>
]]></content:encoded>
	</item>
</channel>
</rss>
