<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://sqlzoo.net/w/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://sqlzoo.net/w/index.php?title=ALTER_TABLE_..._ADD_constraint&amp;feed=atom&amp;action=history</id>
		<title>ALTER TABLE ... ADD constraint - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://sqlzoo.net/w/index.php?title=ALTER_TABLE_..._ADD_constraint&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://sqlzoo.net/w/index.php?title=ALTER_TABLE_..._ADD_constraint&amp;action=history"/>
		<updated>2013-05-22T04:46:41Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.20.4</generator>

	<entry>
		<id>http://sqlzoo.net/w/index.php?title=ALTER_TABLE_..._ADD_constraint&amp;diff=1706&amp;oldid=prev</id>
		<title>Marek at 09:42, 18 July 2012</title>
		<link rel="alternate" type="text/html" href="http://sqlzoo.net/w/index.php?title=ALTER_TABLE_..._ADD_constraint&amp;diff=1706&amp;oldid=prev"/>
				<updated>2012-07-18T09:42:25Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 09:42, 18 July 2012&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 18:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 18:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;div class=&amp;quot;ecomm e-access&amp;quot; style=&amp;quot;display: none&amp;quot;&amp;gt;The check is not supported.&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;div class=&amp;quot;ecomm e-access&amp;quot; style=&amp;quot;display: none&amp;quot;&amp;gt;The check is not supported.&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;div class=&amp;quot;ecomm e-oracle&amp;quot; style=&amp;quot;display: none&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;div class=&amp;quot;ecomm e-oracle&amp;quot; style=&amp;quot;display: none&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;a href=&amp;quot;&lt;/del&gt;http://sqlzoo.napier.ac.uk/big/B/s/a/statements_32a.htm#2103928&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;quot;&amp;gt;&lt;/del&gt;ALTER TABLE t DROP COLUMN c&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/a&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[&lt;/ins&gt;http://sqlzoo.napier.ac.uk/big/B/s/a/statements_32a.htm#2103928 ALTER TABLE t DROP COLUMN c&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;div class=&amp;quot;ecomm e-db2&amp;quot; style=&amp;quot;display: none&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;div class=&amp;quot;ecomm e-db2&amp;quot; style=&amp;quot;display: none&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;a href=&amp;quot;&lt;/del&gt;https://aurora.vcu.edu/db2help/db2s0/frame3.htm#sqls0604&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;quot;&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[&lt;/ins&gt;https://aurora.vcu.edu/db2help/db2s0/frame3.htm#sqls0604 ALTER TABLE documentation.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;]&lt;/ins&gt;&amp;lt;br/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;ALTER TABLE documentation.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/a&amp;gt;&lt;/del&gt;&amp;lt;br/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;DB2 seemingly does not permit this operation - any help would be appreciated.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;DB2 seemingly does not permit this operation - any help would be appreciated.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;div class=&amp;quot;ecomm e-postgres&amp;quot; style=&amp;quot;display: none&amp;quot;&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;a href=&amp;quot;&lt;/del&gt;http://www.ca.postgresql.org/users-lounge/docs/7.0/user/sql-altertable.htm&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;quot;&amp;gt;&lt;/del&gt;ALTER TABLE&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/a&amp;gt;&lt;/del&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;div class=&amp;quot;ecomm e-postgres&amp;quot; style=&amp;quot;display: none&amp;quot;&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[&lt;/ins&gt;http://www.ca.postgresql.org/users-lounge/docs/7.0/user/sql-altertable.htm ALTER TABLE&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;]&lt;/ins&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;{{CREATE and DROP ref}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;{{CREATE and DROP ref}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Marek</name></author>	</entry>

	<entry>
		<id>http://sqlzoo.net/w/index.php?title=ALTER_TABLE_..._ADD_constraint&amp;diff=1693&amp;oldid=prev</id>
		<title>Marek at 09:19, 18 July 2012</title>
		<link rel="alternate" type="text/html" href="http://sqlzoo.net/w/index.php?title=ALTER_TABLE_..._ADD_constraint&amp;diff=1693&amp;oldid=prev"/>
				<updated>2012-07-18T09:19:55Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 09:19, 18 July 2012&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;We can add a constraint&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;We can add a constraint&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;a foreign key reference&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;a UNIQUE requirement&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;a CHECK constraint&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;a foreign key reference&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;a UNIQUE requirement&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;a CHECK constraint&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;This is in the SQL standard &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;ALTER TABLE: &lt;/del&gt;http://sqlzoo.net/sql92.html#alter_table_statement&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;This is in the SQL standard &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[&lt;/ins&gt;http://sqlzoo.net/sql92.html#alter_table_statement &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ALTER TABLE]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;source lang=sql class='tidy'&amp;gt;DROP TABLE a&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;source lang=sql class='tidy'&amp;gt;DROP TABLE a&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Marek</name></author>	</entry>

	<entry>
		<id>http://sqlzoo.net/w/index.php?title=ALTER_TABLE_..._ADD_constraint&amp;diff=1123&amp;oldid=prev</id>
		<title>Marek at 15:52, 12 July 2012</title>
		<link rel="alternate" type="text/html" href="http://sqlzoo.net/w/index.php?title=ALTER_TABLE_..._ADD_constraint&amp;diff=1123&amp;oldid=prev"/>
				<updated>2012-07-12T15:52:06Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 15:52, 12 July 2012&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;We can add a constraint&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;We can add a constraint&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;a foreign key reference&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;a UNIQUE requirement&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;a CHECK constraint&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;a foreign key reference&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;a UNIQUE requirement&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;a CHECK constraint&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;This is in the SQL standard&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;This is in the SQL standard &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ALTER TABLE: &lt;/ins&gt;http://sqlzoo.net/sql92.html#alter_table_statement&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;a href=&amp;quot;&lt;/del&gt;http://sqlzoo.net/sql92.html#alter_table_statement&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;quot;&amp;gt;ALTER TABLE&amp;lt;/a&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;source lang=sql class='tidy'&amp;gt;DROP TABLE a&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;source lang=sql class='tidy'&amp;gt;DROP TABLE a&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Marek</name></author>	</entry>

	<entry>
		<id>http://sqlzoo.net/w/index.php?title=ALTER_TABLE_..._ADD_constraint&amp;diff=1120&amp;oldid=prev</id>
		<title>Marek: Created page with &quot;Add a constraint to a table. &lt;div class='ht'&gt; &lt;div class=params&gt;schema:scott&lt;/div&gt; &lt;div&gt; We can add a constraint &lt;ul&gt;&lt;li&gt;a foreign key reference&lt;/li&gt;&lt;li&gt;a UNIQUE requirement&lt;/...&quot;</title>
		<link rel="alternate" type="text/html" href="http://sqlzoo.net/w/index.php?title=ALTER_TABLE_..._ADD_constraint&amp;diff=1120&amp;oldid=prev"/>
				<updated>2012-07-12T15:47:57Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;Add a constraint to a table. &amp;lt;div class=&amp;#039;ht&amp;#039;&amp;gt; &amp;lt;div class=params&amp;gt;schema:scott&amp;lt;/div&amp;gt; &amp;lt;div&amp;gt; We can add a constraint &amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;a foreign key reference&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;a UNIQUE requirement&amp;lt;/...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Add a constraint to a table.&lt;br /&gt;
&amp;lt;div class='ht'&amp;gt;&lt;br /&gt;
&amp;lt;div class=params&amp;gt;schema:scott&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
We can add a constraint&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;a foreign key reference&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;a UNIQUE requirement&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;a CHECK constraint&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
This is in the SQL standard&lt;br /&gt;
&amp;lt;a href=&amp;quot;http://sqlzoo.net/sql92.html#alter_table_statement&amp;quot;&amp;gt;ALTER TABLE&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;source lang=sql class='tidy'&amp;gt;DROP TABLE a&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=sql class='setup'&amp;gt;CREATE TABLE a(x INTEGER, y INTEGER);&lt;br /&gt;
INSERT INTO a VALUES (1,2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang='sql' class='def'&amp;gt;ALTER TABLE a ADD CHECK (y&amp;gt;0)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;ecomm e-mysql&amp;quot; style=&amp;quot;display: none&amp;quot;&amp;gt;The check gets ignored.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;ecomm e-access&amp;quot; style=&amp;quot;display: none&amp;quot;&amp;gt;The check is not supported.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;ecomm e-oracle&amp;quot; style=&amp;quot;display: none&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;a href=&amp;quot;http://sqlzoo.napier.ac.uk/big/B/s/a/statements_32a.htm#2103928&amp;quot;&amp;gt;ALTER TABLE t DROP COLUMN c&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;ecomm e-db2&amp;quot; style=&amp;quot;display: none&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;a href=&amp;quot;https://aurora.vcu.edu/db2help/db2s0/frame3.htm#sqls0604&amp;quot;&amp;gt;&lt;br /&gt;
ALTER TABLE documentation.&amp;lt;/a&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
DB2 seemingly does not permit this operation - any help would be appreciated.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;ecomm e-postgres&amp;quot; style=&amp;quot;display: none&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://www.ca.postgresql.org/users-lounge/docs/7.0/user/sql-altertable.htm&amp;quot;&amp;gt;ALTER TABLE&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
{{CREATE and DROP ref}}&lt;/div&gt;</summary>
		<author><name>Marek</name></author>	</entry>

	</feed>