Reputation: 354
I am new in SQL . When I am going to use this query , it occurs error . Here is my query :
with new_table ( loan, customer_city ) as
(
select l.loan_number , c.customer_name, customer_city
from loan l
join borrower b on b.loan_number = l.loan_number
join customer c on c.customer_name = b.customer_name
order by loan_number
)
select customer_city
from new_table;
Upvotes: 2
Views: 3298
Reputation:
Column aliasing in the declaration of a CTE was introduced in Oracle 11.2. In 10g, you must create the aliases within the subquery itself, something like
with new_table as (select loan.loan_number as loan, .....)
Upvotes: 6