
|
If you were logged in you would be able to see more operations.
|
|
|
|
Issue Links:
|
Relate
|
|
|
|
This issue is related to:
|
|
|
|
|
|
CORE-1089
Wrong ordering with views, distinct, left join and order by
|
|
|
|
|
|
|
| Planning Status: |
Unspecified
|
|
If a derived table (or a view) contains both a left/right join and an ORDER BY clause and the outer query also contains an ORDER BY clause, the latter one gets ignored.
Test query against the EMPLOYEE sample database:
select *
from (
select
emp_no, first_name, last_name, country, currency
from employee
left join country on employee.job_country = country.country
order by last_name
)
order by emp_no desc
The result is ordered by "last_name".
|
|
Description
|
If a derived table (or a view) contains both a left/right join and an ORDER BY clause and the outer query also contains an ORDER BY clause, the latter one gets ignored.
Test query against the EMPLOYEE sample database:
select *
from (
select
emp_no, first_name, last_name, country, currency
from employee
left join country on employee.job_country = country.country
order by last_name
)
order by emp_no desc
The result is ordered by "last_name".
|
Show » |
|