4

The SELECT Statement

In this chapter:

  • How do you write a basic query using SELECT statements?

  • What types of SELECT statements are possible?

  • What else is interesting about SELECT statements?

In this chapter, we dive right into the syntax and use of the SELECT statement to query the database. We also briefly discuss different types of queries, finally examining specific aspects of queries such as using DISTINCT and the DUAL table. So let’s begin with the basics of the SELECT statement and some simple examples just to get into the swing of things.

4.1 The Basic SELECT Statement

SELECT is the beginning of the SQL command for querying (retrieving) data from a database table, view, or object. Objects are similar to tables, but they have a more ...

Get Oracle SQL 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.