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
Using the Collection Methods The collection methods below help to generalize the code and make collections easier to use and also make your applications easier to maintain:

Cause of Indeterminacy in SQL One root cause of indeterminacy in SQL lies in its implementation of comparison for equality. For certain system-defined types it is possible for

Disjunction (OR, ∨) Again we have nine rows instead of just four and again, when unknown is not involved, the rows are as for 2VL. Also, when anything is paired with true, t

Multiset types - SQL An SQL multiset is what in mathematics is also known as a bag-something like a set except that the same element can appear more than once. The body of an

Using PRIOR and NEXT The PRIOR(n) returns the index number that precede index n in a collection. The NEXT(n) returns the index number which succeed the index n. If n has no pr

Controlling Autonomous Transactions The first SQL statement in an autonomous routine starts a transaction. Whenever one transaction ends, the next SQL statement starts the oth

Semidifference via NOT IN and a subquery SELECT StudentId FROM IS_CALLED WHERE Name = 'Devinder' AND StudentId NOT IN (SELECT StudentId FROM IS_ENROLLED_ON WHER

If two relations R and S are joined, then the non matching tuples of both R and S are ignored in __________________.

%FOUND Subsequent to a cursor or cursor variable is opened but before the first fetch, the %FOUND yields NULL. Afterward, it yields TRUE when the last fetch returned a row, or

Table Represents an Extension - SQL It describes how each tuple in a relation represents a true instantiation of some predicate and each true instantiation is represented by s