O'Reilly logo

Oracle SQL: A Beginner’s Tutorial by Djoni Darmawikarta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2

Basic Queries

A query is a request for data from one or more tables. When you execute a query, rows that satisfy the condition of the query will be returned as a table. Similarly, when a query embedded in another query or a program gets executed, the data returned to the other query or the program is a table.

In this chapter you learn how to write basic queries using the SELECT statement. Once you master the basic queries, you can start learning about queries within other queries in Chapter 6, “Subqueries” and within PL/SQL programs in Chapter 10, “PL/SQL.”

The SELECT statement

All queries regardless of their complexity use the SELECT statement. The SELECT statement has the following general syntax.

SELECT column_names FROM table_name ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required