Your browser does not support JavaScript. This help page requires JavaScript to render correctly. About Queries
Skip Headers
Previous
Previous
 
Next
Next

About Queries

A query, or SQL SELECT statement, selects data from one or more tables or views.

The simplest form of query has this syntax:

SELECT select_list FROM source_list

The select_list specifies the columns from which the data is to be selected, and the source_list specifies the tables or views that have these columns.

A query nested within another SQL statement is called a subquery.

In the SQL*Plus environment, you can enter a query after the SQL> prompt.

In the SQL Developer environment, you can enter a query in the SQL Worksheet. For instructions, see "Running Queries in SQL Developer".

Note: When the result of a query is displayed, records can be in any order, unless you specify their order with the ORDER BY clause. For more information, see "Sorting Selected Data".

Related Topics

Oracle Database SQL Language Reference for more information about queries and subqueries

Oracle Database SQL Language Reference for more information about the SELECT statement

SQL*Plus User's Guide and Reference

Oracle Database SQL Developer User's Guide

Selecting Table Data