Obtaining a natural join by specifying the common columns, PL-SQL Programming

Obtaining a natural join by specifying the common columns

Synatax:

SELECT * FROM IS_CALLED JOIN IS_ENROLLED_ON USING ( StudentId )

However, a named columns join doesn't always have an equivalent formulation using NATURAL JOIN. That's because although each USING column must be a common column, it is not necessary to specify all the common columns.

A common column whose name does not appear in the USING list gives rise to two columns of that name in the result, which therefore does not represent a relation. To cater for cases where the columns used for matching purposes are not common columns, and/or the matching operator is not "=", the required joining condition can be spelled out as shown in Example, in parentheses following the key word ON.

Posted Date: 1/18/2013 4:50:29 AM | Location : United States







Related Discussions:- Obtaining a natural join by specifying the common columns, Assignment Help, Ask Question on Obtaining a natural join by specifying the common columns, Get Answer, Expert's Help, Obtaining a natural join by specifying the common columns Discussions

Write discussion on Obtaining a natural join by specifying the common columns
Your posts are moderated
Related Questions
Advantages of PL/SQL The PL/SQL is a high-performance transaction processing, completely portable language that offers the following advantages as shown: 1) Support for SQL

Projection in SQL - correct version Student StudentId is enrolled on some course. SELECT DISTINCT StudentId FROM IS_ENROLLED_ON In more complicated examples it is someti

Challenge 1 You are required to do the project and write a test plan for it. Demo 4 is a check writer program for employees. In it, the user enters all information about the

Package STANDARD The package named STANDARD defines the PL/SQL atmosphere. The package specification globally declares the exceptions, types, and subprograms that are available

Raise_application_error -  procedure of package DBMS_STANDARD , allows to issue an user_defined error messages by stored sub-program or database trigger.

Using %TYPE The %TYPE attribute gives the datatype of a variable or the database column. In the example below, the %TYPE gives the datatype of a variable: credit REAL(7,2); debi

Parameter & Keyword Description: function_name: The user-defined function is identifying by that keyword. parameter_name: This identifies the formal parameter that

Use the NOCOPY Compiler Hint By default, the OUT and IN OUT parameters are passed by the value i.e. the value of an IN OUT actual parameter is copied into the corresponding fo

Bulk Binds advantages In the Embedded Oracle RDBMS, the PL/SQL engines accept any valid PL/SQL subprogram or block. As the figure shows, the PL/SQL engine executes all procedur

Rollback Behavior When a FORALL statement fails, the database changes are rolled back to an implicit savepoint marked before each of the SQL statement execution. The Changes t