Why I hate Oracle DB so much? Because it’s unable to do simple things in a simple way
It’s not the first time I complain about Oracle DB doing things in a complicated way. But here is an extreme example of its stupidness:
SELECT bug_id, assigned_to, assigned_to FROM bugs ORDER BY assigned_to;
All this query does is to select the bug ID and the assignee ID twice, and display the list ordered by the assignee ID. This query works correctly in MySQL, MariaDB and PostgreSQL, but fails miserably in Oracle with this error message:
ORA-00960: ambiguous column naming in select list
It complains that we want to sort the list based on the assigned_to column, but this column is mentioned twice in the SELECT part of the query and so it doesn’t know which one to choose to sort the list. As it’s twice the same column, this doesn’t matter!! But Oracle is unable to realize this! If I write:
SELECT bug_id, assigned_to, assigned_to FROM bugs ORDER BY bugs.assigned_to;
then Oracle is happy.
I really wonder why people pay thousands of dollars for such a buggy and heavy software when MySQL/MariaDB and PostgreSQL are way better.