Solved

Inner Joins using TOAD

Posted on 2003-11-13
3
2,824 Views
Last Modified: 2013-12-12
Does anyone know what the SQL code would be in TOAD to do an Inner Join on an Oracle database?
0
Comment
Question by:bjmitts
3 Comments
 
LVL 3

Accepted Solution

by:
jaramill earned 50 total points
Comment Utility
There is no TOAD specific SQL for inner-joins.  It works in whatever SQL environment you are in.

SELECT e.lname, d.name
   FROM employee e, department d
 WHERE e.dept_id = d.dept_id;

This is a normal join (which is also known as an INNER-JOIN).

If you wanted an OUTER-JOIN where one column in one table doesn't match the same column in the opposite table, thus it shows all NULLs, then you need to add a (+) sign to the optional table be it employee or department

SELECT e.lname, d.name
   FROM employee e, department d
 WHERE e.dept_id = d.dept_id (+);

Gio
0
 
LVL 22

Expert Comment

by:Helena Marková
Comment Utility
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept jaramill's comment as answer.

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Henka
EE Cleanup Volunteer
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now