what is JOIN? Give example & types of join?

Answer Posted / antergen suvi danis

Join Syntax:

table_references:
table_reference [, table_reference] ...

table_reference:
table_factor
| join_table

table_factor:
tbl_name [[AS] alias] [index_hint)]
| table_subquery [AS] alias
| ( table_references )
| { OJ table_reference LEFT OUTER JOIN table_reference
ON conditional_expr }

join_table:
table_reference [INNER | CROSS] JOIN table_factor
[join_condition]
| table_reference STRAIGHT_JOIN table_factor
| table_reference STRAIGHT_JOIN table_factor ON
conditional_expr
| table_reference {LEFT|RIGHT} [OUTER] JOIN table_reference

join_condition
| table_reference NATURAL [{LEFT|RIGHT} [OUTER]] JOIN

table_factor

join_condition:
ON conditional_expr
| USING (column_list)

index_hint:
USE {INDEX|KEY} [FOR JOIN] (index_list)
| IGNORE {INDEX|KEY} [FOR JOIN] (index_list)
| FORCE {INDEX|KEY} [FOR JOIN] (index_list)

index_list:
index_name [, index_name] ...

Types of join are,

* Inner Join
* Left Join or Left Outer Join
* Right Join or Right Outer Join
* Equi join
* Non Equi Join
* Natural Join
* Straight Join

Is This Answer Correct ?    16 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why does mysql have so many connections?

486


What is mysql database server?

489


What is tee command in mysql?

483


How to give user privilages for a db. Login as root. Switch to the mysql db. Grant privs. Update privs.

477


How can I remotely connect to mysql database?

445






Can foreign key have duplicate values?

502


What is the full form of mysql?

515


What is blob and clob?

512


What is difference between mongodb and mysql?

460


What is horizontally scalable?

505


What is the role of a limit in a mysql query?

551


What is innodb mysql?

491


What does mysqli stand for?

491


How to start mysql server?

522


What is sharding in mysql?

509