Difference between revisions of "SELECT"

From SQLZOO
Jump to: navigation, search
(Blanked the page)
 
(46 intermediate revisions by 13 users not shown)
Line 1: Line 1:
==BBC Country Profiles==
 
This tutorial introduces SQL as a  query language. We will be using the SELECT command on the table bbc:
 
<table style='' border='1'><tr>
 
<th>name</th>
 
<th>region</th>
 
<th>area</th>
 
<th>population</th>
 
<th>gdp</th>
 
</tr>
 
<tr>
 
<td>Afghanistan</td>
 
<td>South Asia</td>
 
<td align='right'>652225</td>
 
<td align='right'>26000000</td>
 
<td></td>
 
</tr>
 
<tr>
 
<td>Albania</td>
 
<td>Europe</td>
 
<td align='right'>28728</td>
 
<td align='right'>3200000</td>
 
<td align='right'>6656000000</td>
 
</tr>
 
<tr>
 
<td>Algeria</td>
 
<td>Middle East</td>
 
<td align='right'>2400000</td>
 
<td align='right'>32900000</td>
 
<td align='right'>75012000000</td>
 
</tr>
 
<tr>
 
<td>Andorra</td>
 
<td>Europe</td>
 
<td align='right'>468</td>
 
<td align='right'>64000</td>
 
<td></td>
 
</tr>
 
<tr>
 
<td colspan='5'>...</td>
 
</tr>
 
</table>
 
==Exercises==
 
Using the <code>SELECT</code> statement.
 
  
<div class='qu'>
 
<a href="1_1.htm">Read the notes about this table.</a>
 
Issue the command:
 
SELECT name, region, population FROM bbc
 
Look at the output.
 
<source lang='sql'>
 
SELECT name, region, population FROM bbc
 
</source>
 
 
<source lang='sql'>
 
SELECT name, region, population FROM bbc
 
</source>
 
</div>
 

Latest revision as of 05:00, 17 April 2014

Personal tools
Namespaces

Variants
Actions
Reference
Toolbox
Google AdSense