Solved

Inner Joins using TOAD

Posted on 2003-11-13
3
2,913 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
ID: 9854982
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á
ID: 10200411
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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.

860 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