What is a join?Explain the different types of joins?
Answer Posted / sandeep verma
Join match/combine two or more tables from a database. It means, combining rows or fields of two or more tables matching the common values. There are various types of joins which are as follows:
a) Self Join: joining table with it's own record to extract unique record (one employee is manager of other two employee)
b) Inner Join
i) Equi Join:No difference with inner join (just write join instead of inner join)
ii) Cross Join: will get you result each row of first table with each row of the other table(i.e. select * from employee cross join salary)
c) Outer Join
i) Left Outer Join:joins the matching records from two tables and all the records from left side of the table and those unmatched records have null value in right side of the table.
ii) Right Outer Join:joins the matching records from two tables and all the records from right side of the table and those unmatched records have null value in left side of the table.
iii) Full Outer Join: Regardless of matching record of both side of the tables, it produce all the records of both the table and produce NULL values for every column of the table that lacks of matching row.
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
what are the properties and different types of sub-queries? : Sql dba
What are the advantages of pl sql?
How do I run a sql trace?
Is postgresql a server?
What are the two different parts of the pl/sql packages?
How to avoid using cursors?
Is natural join and inner join same?
What is compiled query?
what is heap table? : Sql dba
What are the operators used in select statements?
1. is it possible to use the cursor atttibutes (%found ,% rowcount , %isopen , %notfound ) to our user defined cursor names ....... cursor cursor_name is select * from scott.emp if you use... cursor_name%found , %rowcount ,%isopen,%notfound...will it work... -------------------------- 2.what is the difference between the varray and index by table .. -------- 3. type type_name is table of number(8,3) index by binary_integer; identifier_name type_name; first , last , prior , next ,trim are the methods we can use it for the above type...simillary is there any way to apply for cursors... with thanks and regards..sarao...
what is recursive stored procedure? : Sql dba
What is the use of index in sql?
What is the purpose of the primary key?
What does <> sql mean?