Difference between revisions of "SQLZOO:SELECT basics"

From SQLZOO
Jump to: navigation, search
(Created page with "==Introducing the BBC Table of Countries== This tutorial introduces SQL as a query language. We will be using the SELECT command on the table bbc: <table style='' border='1'>...")
 
(Population of Germany)
Line 41: Line 41:
 
</table>
 
</table>
  
==Population of Germany==
 
 
<div class='qu'>
 
<div class='qu'>
 
The example shows the population of 'France'.
 
The example shows the population of 'France'.

Revision as of 11:59, 5 July 2012

Introducing the BBC Table of Countries

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
...

The example shows the population of 'France'. Strings should be in 'single quotes';

Show the population of Germany

SELECT population FROM bbc
  WHERE name = 'France'
SELECT population FROM bbc
  WHERE name = 'Germany'
Personal tools

Variants
Actions
Reference
Toolbox
Google AdSense