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
TYPES OF EVOLUTION - Sequential evolution                  :                    Minor changes in the gene pool of a population from one generation to the next, with the resul

RETURN Statement The RETURN statement instantly completes the execution of a subprogram and returns control to the caller. The Execution then resumes with the statement below t

Query: SELECT * FROM EMPLOYEE1; Select 5 columns and all rows from one table Query: SELECT C_ID, COMPANY, BUILDING, DEPARTMENT, BRANCH FROM CONTRACT;

WHILE-LOOP The WHILE-LOOP statement relates a condition with the series of statements enclosed by the keywords LOOP and END LOOP, as shown: WHILE condition LOOP sequence_of_sta

Using Cursor Attributes: Every cursor has 4 attributes: %NOTFOUND, %FOUND, %ISOPEN, and %ROWCOUNT. If appended to the cursor name, they return the helpful information about

Manipulating Local Collections Within PL/SQL, to manipulate the local collection, by using the  TABLE and CAST operators . The operands of CAST are a collection declared locally

MECHANISTI S THEORY-HAECKEL (1866) - Haeckel stating that after each catalysm, some new organism suddenly forms as a chance event in one stride from inanimate matter and sub

Effects of NULL for Table Expression Here's an important distinction between expressions denoting tables and expressions denoting multisets of rows: a table expression cannot

Usefulness of Data Type In SQL, as in most computer languages, a type can be used for constraining the values that are permitted to be used for some purpose. In particular, i

Varrays versus Nested Tables The Nested tables are differing from varrays in the following ways: 1)  Varrays have a maximum size, while nested tables do not. 2)  Varrays are