<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" 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:slash="http://purl.org/rss/1.0/modules/slash/" ><channel><title>SQL Server Planet &#187; DDL</title> <atom:link href="http://sqlserverplanet.com/category/ddl/feed/" rel="self" type="application/rss+xml" /><link>http://sqlserverplanet.com</link> <description>Tips and Articles on SQL Server</description> <lastBuildDate>Wed, 07 Jul 2010 05:16:42 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0</generator> <item><title>Add Column Constraint</title><link>http://sqlserverplanet.com/ddl/add-column-constraint/</link> <comments>http://sqlserverplanet.com/ddl/add-column-constraint/#comments</comments> <pubDate>Sun, 02 Aug 2009 16:37:59 +0000</pubDate> <dc:creator>Derek Dieter</dc:creator> <category><![CDATA[DDL]]></category><guid isPermaLink="false">http://sqlserverplanet.com/?p=886</guid> <description><![CDATA[To add a constraint to an existing table use the alter table statement with the add constraint command. There are four different types of constraints: Primary Key Constraints &#8211; Enforces unique values for specified column, can be referenced. Foreign Key Constraints &#8211; Enforces a reference to a primary key Unique Constraints &#8211; Ensures unique values [...]]]></description> <wfw:commentRss>http://sqlserverplanet.com/ddl/add-column-constraint/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Add Column Default Value</title><link>http://sqlserverplanet.com/ddl/add-column-default-value/</link> <comments>http://sqlserverplanet.com/ddl/add-column-default-value/#comments</comments> <pubDate>Wed, 29 Jul 2009 23:56:32 +0000</pubDate> <dc:creator>Derek Dieter</dc:creator> <category><![CDATA[DDL]]></category><guid isPermaLink="false">http://sqlserverplanet.com/?p=868</guid> <description><![CDATA[In SQL Server there are two ways to add a column with a default value. Add Default Value to Existing Column -- Add default to existing column DateOfHire: ALTER TABLE [dbo].[Employees] ADD DEFAULT (getdate()) FOR [DateOfHire] -- Add default value to existing column IsTerminated ALTER TABLE [dbo].[Employees] ADD DEFAULT ((0)) FOR [IsTerminated] Add New Column [...]]]></description> <wfw:commentRss>http://sqlserverplanet.com/ddl/add-column-default-value/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Add Foreign Key</title><link>http://sqlserverplanet.com/ddl/add-foreign-key/</link> <comments>http://sqlserverplanet.com/ddl/add-foreign-key/#comments</comments> <pubDate>Mon, 27 Jul 2009 00:51:16 +0000</pubDate> <dc:creator>Derek Dieter</dc:creator> <category><![CDATA[DDL]]></category><guid isPermaLink="false">http://sqlserverplanet.com/?p=861</guid> <description><![CDATA[To Add a foreign key to a column in an existing table, use ALTER TABLE ADD CONSTRAINT ALTER TABLE dbo.President_Lookup ADD CONSTRAINT fk_PresidentID FOREIGN KEY (PresidentID) REFERENCES dbo.Presidents (PresidentID) Related Posts:»Add Column Constraint»Add Constraint»Add Primary Key»Alter Table Alter Column»Alter Table Add Column»SQL Server Keywords (Reserved Words)»Rename Column»Add Column Default Value»SQL Server Add Primary Key»Create Table]]></description> <wfw:commentRss>http://sqlserverplanet.com/ddl/add-foreign-key/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Add Constraint</title><link>http://sqlserverplanet.com/ddl/add-constraint/</link> <comments>http://sqlserverplanet.com/ddl/add-constraint/#comments</comments> <pubDate>Sun, 26 Jul 2009 03:12:21 +0000</pubDate> <dc:creator>Derek Dieter</dc:creator> <category><![CDATA[DDL]]></category><guid isPermaLink="false">http://sqlserverplanet.com/?p=845</guid> <description><![CDATA[To add a constraint to an existing table use the alter table statement with the add constraint command. There are four different types of constraints: Primary Key Constraints &#8211; Enforces unique values for specified column, can be referenced. Foreign Key Constraints &#8211; Enforces a reference to a primary key Unique Constraints &#8211; Ensures unique values [...]]]></description> <wfw:commentRss>http://sqlserverplanet.com/ddl/add-constraint/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Add Index</title><link>http://sqlserverplanet.com/ddl/add-index/</link> <comments>http://sqlserverplanet.com/ddl/add-index/#comments</comments> <pubDate>Sun, 26 Jul 2009 01:40:52 +0000</pubDate> <dc:creator>Derek Dieter</dc:creator> <category><![CDATA[DDL]]></category><guid isPermaLink="false">http://sqlserverplanet.com/?p=838</guid> <description><![CDATA[To add an index in SQL Server use the CREATE INDEX statements. When adding indexes remember there can only be one clustered index per table. The main options when creating an index are clutered or nonclustered or unique vs non unique. Using SQL 2005+ you can also specify columns to include at the leaf level [...]]]></description> <wfw:commentRss>http://sqlserverplanet.com/ddl/add-index/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 59/67 queries in 0.116 seconds using disk
Content Delivery Network via files.sqlserverplanet.com

Served from: sqlserverplanet.com @ 2010-07-31 08:53:56 -->