SELECT .. WHERE

From SQLZOO
Revision as of 15:37, 16 July 2012 by Connor (Talk | contribs) (Created page with " <h1>SELECT .. WHERE</h1> <p>The table <code>games</code> shows the year and the city hosting the Olympic Games.</p> <table> <caption align='center'>games</caption> <tr><th al...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

SELECT .. WHERE

The table games shows the year and the city hosting the Olympic Games.

The SELECT statement returns results from a table. With a WHERE clause only some rows are returned. In this example shows the year that Athens hosted the Olympic games.

schema:scott
SELECT yr, city 
FROM gisq.games
SELECT yr, city 
FROM games

See also

games
yrcity
2000Sydney
2004Athens
2008Beijing
2012London