As i know inline view is not a database object and it is just like writing a sub query in from clause so what is the use of naming it as a view .Simply we can call as a sub query.
It is Oracle naming convention. From Inline View and Subquery:
An inline view is a SELECT statement in the FROM-clause of another SELECT statement. In-line views are commonly used to simplify complex queries by removing join operations and condensing several separate queries into a single query.
This feature is commonly referred to in the MSSQL community as a derived table, and in the Postgres community simply refers to it as a subselect (subselects are inline views + subqueries in Oracle nomenclature).
A subquery (sub-query) is a SELECT statement in the WHERE- or HAVING-clause of another SELECT statement.
So when you used it with FROM
it is called inline view
:
SELECT *
FROM ( SELECT deptno, count(*) emp_count
FROM emp
GROUP BY deptno ) emp,
dept
WHERE dept.deptno = emp.deptno;
And when you used it with WHERE
/HAVING
it is called subquery
:
SELECT ename, deptno
FROM emp
WHERE deptno = (SELECT deptno
FROM emp
WHERE ename = 'TAYLOR');