Answer: 1). self-join and cross-join both produces the same output.
2). self-join is applied in same table only whereas cross-join is applied in different tables.
3). in case of self-join,we have to give alias name in table but in case of cross-join, it may or may not required.
Syntax of self-join:-
select * from employee_master A,employee_master B;
Syntax of cross-join:-
select * from employee_master A,project_master B;
//or we can also write as:-
select * from employee_master,project_master;
Asked In: Many Interviews |
Alert Moderator