<?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=CREATE_a_VIEW&amp;feed=atom&amp;action=history</id>
		<title>CREATE a VIEW - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://sqlzoo.net/w/index.php?title=CREATE_a_VIEW&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://sqlzoo.net/w/index.php?title=CREATE_a_VIEW&amp;action=history"/>
		<updated>2013-05-22T00:21:32Z</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=CREATE_a_VIEW&amp;diff=1717&amp;oldid=prev</id>
		<title>Marek at 10:52, 18 July 2012</title>
		<link rel="alternate" type="text/html" href="http://sqlzoo.net/w/index.php?title=CREATE_a_VIEW&amp;diff=1717&amp;oldid=prev"/>
				<updated>2012-07-18T10:52:26Z</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 10:52, 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 38:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 38:&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&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&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;/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;/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-&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;mysql&lt;/del&gt;&amp;quot; style=&amp;quot;display: none&amp;quot;&amp;gt;A view is called a ''query'' in Microsoft Access.&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-&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;access&lt;/ins&gt;&amp;quot; style=&amp;quot;display: none&amp;quot;&amp;gt;A view is called a ''query'' in Microsoft Access.&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;#160;&amp;#160;  Use DROP TABLE to remove a view.&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;#160;&amp;#160;  Use DROP TABLE to remove a view.&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=CREATE_a_VIEW&amp;diff=1513&amp;oldid=prev</id>
		<title>Marek at 14:00, 17 July 2012</title>
		<link rel="alternate" type="text/html" href="http://sqlzoo.net/w/index.php?title=CREATE_a_VIEW&amp;diff=1513&amp;oldid=prev"/>
				<updated>2012-07-17T14:00:23Z</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 14:00, 17 July 2012&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 12:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 12:&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;/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;/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 VIEW v_europe&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 VIEW v_europe&amp;lt;/source&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;source lang=sql class='tidy e-access'&amp;gt;DROP TABLE v_europe&amp;lt;/source&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;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;!--&lt;/ins&gt;&amp;lt;source lang=sql class='tidy e-access'&amp;gt;DROP TABLE v_europe&amp;lt;/source&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt;--&lt;/ins&gt;&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='setup'&amp;gt;DROP TABLE world; &amp;#160;&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='setup'&amp;gt;DROP TABLE world; &amp;#160;&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 TABLE world(&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 TABLE world(&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=CREATE_a_VIEW&amp;diff=1109&amp;oldid=prev</id>
		<title>Marek: Created page with &quot;CREATE a VIEW. &lt;div class='ht'&gt; &lt;div class=params&gt;schema:scott&lt;/div&gt; &lt;div&gt; A view is a named SELECT statement.  In this example we show only European countries, we also show t...&quot;</title>
		<link rel="alternate" type="text/html" href="http://sqlzoo.net/w/index.php?title=CREATE_a_VIEW&amp;diff=1109&amp;oldid=prev"/>
				<updated>2012-07-12T15:14:42Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;CREATE a VIEW. &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; A view is a named SELECT statement.  In this example we show only European countries, we also show t...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;CREATE a VIEW.&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;
A view is a named SELECT statement.&lt;br /&gt;
&lt;br /&gt;
In this example we show only European countries, we also&lt;br /&gt;
show the population in millions.&lt;br /&gt;
&lt;br /&gt;
Note how the columns of the table may be named.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=sql class='tidy'&amp;gt;DROP VIEW v_europe&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=sql class='tidy e-access'&amp;gt;DROP TABLE v_europe&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=sql class='setup'&amp;gt;DROP TABLE world; &lt;br /&gt;
CREATE TABLE world(&lt;br /&gt;
   name VARCHAR(50) NOT NULL&lt;br /&gt;
   ,region VARCHAR(60)&lt;br /&gt;
   ,population DECIMAL(11)	&lt;br /&gt;
   ,PRIMARY KEY (name)&lt;br /&gt;
   );&lt;br /&gt;
INSERT INTO world VALUES ('China','Asia',1261);&lt;br /&gt;
INSERT INTO world VALUES ('France','Europe',59);&lt;br /&gt;
INSERT INTO world VALUES ('India','Asia',1014);&lt;br /&gt;
INSERT INTO world VALUES ('Italy','Europe',57);&lt;br /&gt;
INSERT INTO world VALUES ('Japan','Asia',126);&lt;br /&gt;
INSERT INTO world VALUES ('Russia','Asia',146);&lt;br /&gt;
INSERT INTO world VALUES ('Spain','Europe',39);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang='sql' class='def'&amp;gt;CREATE VIEW v_europe AS&lt;br /&gt;
 SELECT name,&lt;br /&gt;
        population AS pop&lt;br /&gt;
  FROM world &lt;br /&gt;
  WHERE region='Europe';&lt;br /&gt;
&lt;br /&gt;
SELECT * FROM v_europe&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;A view is called a ''query'' in Microsoft Access.&lt;br /&gt;
   Use DROP TABLE to remove a view.&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>