Difference between revisions of "SELECT"
From SQLZOO
(Created page with "<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='rig...") |
|||
| 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> | <table style='' border='1'><tr> | ||
<th>name</th> | <th>name</th> | ||
| Line 38: | Line 40: | ||
</tr> | </tr> | ||
</table> | </table> | ||
| + | ==Exercises== | ||
| + | Using the <code>SELECT</code> statement. | ||
| + | |||
| + | <qu id="1a" rows="3" cols="45"> | ||
| + | <a href="1_1.htm">Read the notes about this table.</a> | ||
| + | Issue the command: | ||
| + | <code>SELECT name, region, population FROM bbc</code>. | ||
| + | Look at the output. | ||
| + | <def> | ||
| + | SELECT name, region, population FROM bbc | ||
| + | </def> | ||
| + | |||
| + | <ans> | ||
| + | SELECT name, region, population FROM bbc | ||
| + | </ans> | ||
| + | </qu> | ||
Revision as of 13:58, 7 February 2012
BBC Country Profiles
This tutorial introduces SQL as a query language. We will be using the SELECT command on the table bbc:
| name | region | area | population | gdp |
|---|---|---|---|---|
| Afghanistan | South Asia | 652225 | 26000000 | |
| Albania | Europe | 28728 | 3200000 | 6656000000 |
| Algeria | Middle East | 2400000 | 32900000 | 75012000000 |
| Andorra | Europe | 468 | 64000 | |
| ... | ||||
Exercises
Using the SELECT statement.
<qu id="1a" rows="3" cols="45">
<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.
<def>
SELECT name, region, population FROM bbc
</def>
<ans> SELECT name, region, population FROM bbc </ans> </qu>