FROM Clause in Oracle

From clause is one of the important clauses of the Oracle SQL query.

It helps to retrieve data from a single table or view, multiple tables or views, and in-line queries.

One table is mandatory to be mentioned in the from clause of the query.

If there are multiple tables, they are joined either using standard Oracle standards or ANSI standards.



  FROM [schema_name.]table_name_1
       [, table_name_2...table_name_n]
       [,in-line query]
 WHERE condition_1
   AND condition_2
   AND condition_n;
Parameters Explanation

schema_name (optional)

  • Schema name in which the table is present

table_name_1, table_name_2…table_name_n

  • Table names to retrieve data from

condition_1, condition_2…condition_n

  • Conditions to filter the retrieved data

in-line query

  • In-line query to retrieve data from


  • Data retrieved from a single table
SELECT * FROM employees;

This query fetches all records from the employees table in this example.

  • Data retrieved from multiple tables using joins
SELECT e.emp_name, d.dept_name
  FROM employees e, departments d
 WHERE e.dept_id = d.dept_id;

Joining column dept_id from employees and departments table fetch employee name and department name in this example

  • Data retrieved by joining tables and in-line queries
FROM employees e, (SELECT d.dept_id, d.dept_name 
                     FROM departments d) dept
WHERE e.dept_id = dept.dept_id;

Joining an in-line query with the employees table fetches all columns of the employees table in this example.

I hope you like the page and find it useful. We highly appreciate comments and feedback.

You can also Subscribe here to stay updated on latest posts of

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.