Difference between revisions of "SELECT Reference"
From SQLZOO
| Line 4: | Line 4: | ||
The output from a SELECT statement is always a grid - with a number of rows and a number of columns. | The output from a SELECT statement is always a grid - with a number of rows and a number of columns. | ||
The simplest SELECT commands involve a single table: | The simplest SELECT commands involve a single table: | ||
| + | <div class='ht'> | ||
<source lang='sql'> | <source lang='sql'> | ||
SELECT name, population | SELECT name, population | ||
| Line 9: | Line 10: | ||
WHERE region='North America' | WHERE region='North America' | ||
</source> | </source> | ||
| + | </div> | ||
Revision as of 10:03, 11 August 2012
SELECT Operations
The SELECT command is used to show data from a database.
The output from a SELECT statement is always a grid - with a number of rows and a number of columns. The simplest SELECT commands involve a single table:
SELECT name, population FROM bbc WHERE region='North America'