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
Project Description: This is stage 1 of a larger conversion project. We are converting a traditional Server/Client application written in Access 2007 into a web interface with S

Object Types An object type is a user-defined complex datatype which encapsulates the data structure along with the functions and procedures required to manipulate the data. Th

Example of Null operator - NiNo Rule If we wanted to make HIGHER_OF adhere to "NULL in, NULL out"-let's call it the NiNo rule-we would have to write something like what is sho

Scoping Within the similar scope, all the declared identifiers should be unique. So, even if their datatypes differ, the variables and parameters cannot share the similar name.

Manipulating Collections Within PL/SQL, the collections add procedural power and flexibility. The biggest benefit is that your program can compute subscripts to process the spec

Committing and Rolling Back The COMMIT and ROLLBACK end the active autonomous transaction but do not exit the autonomous routine. As the figure shows, if one transaction ends,

Parameter Aliasing   To optimize the subprogram call, the PL/SQL compiler can decide between the two techniques of the parameter passing. With the by-value techniques, the v

Explicitly specifying the join condition - SQL SELECT * FROM IS_CALLED JOIN IS_ENROLLED_ON ON ( IS_CALLED.StudentId = IS_ENROLLED_ON.StudentId ) Now, the key word JO

Literals A literal is an explicit numeric, string, character, or Boolean value not represented by an identifier. Numeric literal 147 and the Boolean literal FALSE are some of

Cursor Attributes   The Cursors and cursor variables have 4 attributes which give you helpful information about the execution of a data manipulation statement. Syntax: