In 10 minutes, learn how to use the SQL SELECT statement to retrieve a single table column, multiple table columns, and all table columns and how to return distinct values and comment your code.
Save 35% off the list price* of the related book or multi-format eBook (EPUB + MOBI + PDF) with discount code ARTICLE.
* See informit.com/terms
In this lesson, you’ll learn how to use the all-important SELECT statement to retrieve one or more columns of data from a table.
The SELECT Statement
As explained in Lesson 1, “Understanding SQL,” SQL statements are made up of plain English terms. These terms are called keywords, and every SQL statement is made up of one or more keywords. The SQL statement that you’ll probably use most frequently is the SELECT statement. Its purpose is to retrieve information from one or more tables.
To use SELECT to retrieve table data, you must, at a minimum, specify two pieces of information—what you want to select and from where you want to select it.