Unit 8.1. SQL Basics

Clauses of the Select Statement

Table 8.1 shows the clauses and keywords of a SELECT statement. The clauses are listed in the recommended order for an actual SELECT statement.

The most basic SELECT statement is one with only a SELECT and FROM clause. The SELECT clause lists the columns to be included in the result set. The FROM clause lists the tables from which to select the data.

FOR EXAMPLE

SELECT first_name, last_name 
  FROM student; 

This will select the first name and last name columns for all of the rows in the student table. To limit the number of rows returned, the WHERE clause is needed. The WHERE clause has two ...

Get Oracle® Web Application Programming for PL/SQL® Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.