msgbartop
News, views, tips and tricks on Oracle and other fun stuff
msgbarbottom

Back to basics: self joins

A self join is a join of a table to itself. This table appears twice (or more) in the FROM clause and is followed by table aliases that qualify column names in the join condition and the SELECT clause. Take for example the employees table, the manager of one employee is also an employee. The rows for both are in the same employees table.

To get information about an employee and her manager, you have to join the employee table to itself, thereby treating employees as if it were two separate tables. The following example query uses a self join to return the name of each employee along with the name of the employee’s manager: Continue reading…

7 Comments | Filed in Joins, Oracle | Tags: ,


links for 2006-07-07

Comments Off | Filed in Interesting Stuff


SQL Developer and UTF8

In this global economy the need for software globalization is increasing. As a result of this globalization, localization is becoming an important part of software development. And as a result of this localization, software developers like myself will have to work with multiple languages. So, it is becoming more crucial to have development tools that support multi-byte in addition to single-byte characters, like Chinese versus English for example.

As an Oracle database developer I have been using Quest Software Inc.’s SQL Navigator for years. We are currently involved in the implementation of Oracle E-Business Suite in our new plant in China. So, now we have the Chinese characters to worry about. It turns out that SQL Navigator does not support multi-byte characters and UTF8 encoding (which is needed to display Chinese characters), however, Oracle’s SQL developer does :)

Here is how SQL Navigator displays a query result that returns Chinese characters: Continue reading…

23 Comments | Filed in Oracle, Tips | Tags: , , , ,