ORACLE Subqueries

In Oracle, subqueries are the queries inside a query. Subqueries can be made using WHERE, FROM or SELECT clause.

Table 1: employee1

ORACLE Subqueries

Table 2: employee2

ORACLE Subqueries

Example 1

Query: Select name, city from employee1 where id in (select id from employee2 where designation='Shareholder')

ORACLE Subqueries

Example 2

Query: Select e.id, e.city, e.name, e1.designation from employee1 e join employee2 e1 on (e.id = e1.id)

ORACLE Subqueries
Related Tutorial
Follow Us
https://www.facebook.com/Rookie-Nerd-638990322793530 https://twitter.com/RookieNerdTutor https://plus.google.com/b/117136517396468545840 #
Contents +