Q. Which of the following is one of the basic approaches for joining tables?
- Subqueries
- Union Join
- Natural join
- All of the above
Answer: All of the above
Subqueries, Union Join and Natural Join are the basic approaches for joining tables.
- A Subquery or Inner query or a Nested query is a query within another SQL query and embedded within the WHERE clause.
- The UNION operator is used to combine the result-set of two or more SELECT statements.
- The SQL NATURAL JOIN is a type of EQUI JOIN and is structured in such a way that, columns with the same name of associated tables will appear once only.
A NATURAL JOIN is a JOIN operation that creates an implicit join clause for you based on the common columns in the two tables being joined. Common columns are columns that have the same name in both tables. A NATURAL JOIN can be an INNER join, a LEFT OUTER join, or a RIGHT OUTER join.
No comments:
Post a Comment
What you have to say about this?