Oracle Clause | Oracle From Clause - oracle tutorial - sql tutorial



Oracle from clause

Learn oracle - oracle tutorial - Oracle from clause - oracle examples - oracle programs

What is Oracle FROM clause ?

  • FROM clause is a mandatory clause in SELECT expression.
  • It specifies the tables from which data is to be retrieved.
  • The Oracle/PLSQL FROM clause is used to list the tables and any join information required for the Oracle query.

Syntax:

FROM table_name...
                   Expressions...
click below button to copy the code. By - oracle tutorial - team

Oracle FROM Clause Example: (with one table)

  • Let's take an example to explain how to use FROM clause to retrieve data from one table. Consider a table "customers".

Customer table:

CREATE TABLE  "CUSTOMERS" 
   (	"NAME" VARCHAR2(4000), 
	"AGE" NUMBER, 
	"SALARY" NUMBER, 
	"STATE" VARCHAR2(4000)
   )
/
click below button to copy the code. By - oracle tutorial - team
 customer table from clause

Execute this query

SELECT *
FROM customers
WHERE salary >= 20000
ORDER BY salary ASC;
click below button to copy the code. By - oracle tutorial - team

Output:

 oracle from clause one output

Oracle FROM Clause Example: (with two tables)

Inner Join example

  • Let's take two tables "suppliers" and "order1".

Suppliers:

 supplier table
 supplier data

Order1:

 supplier order
 supplier order

Execute the following query:

SELECT suppliers.supplier_id, suppliers.supplier_name, order1.order_number
FROM suppliers
INNER JOIN order1
ON suppliers.supplier_id = order1.supplier_id;
click below button to copy the code. By - oracle tutorial - team

Output:

 supplier order output

This tutorial provides an indepth knowledge on the following items such as oracle tutorial , sql tutorial , sql , pl sql tutorial , oracle , pl sql , mysql tutorial , sql tutorial for beginners , learn sql , oracle database tutorial , sql query tutorial , oracle dba tutorial , plsql tutorial , oracle tutorial pdf , oracle pl sql tutorial , oracle sql tutorial , sql tutorial point , oracle tutorial for beginners , learn oracle online free , learn oracle online , learning pl sql programming , learn sql online for free , sql learning online , dba oracle tutorial , oracle sql tutorial advanced , oracle 11g dba tutorial with examples , oracle online learning , oracle learning online , how to learn pl sql , sql coding tutorial , sql learning websites , sql basic learning

Related Searches to Oracle Clause | Oracle From Clause