What are the all different types of Joins in SQL Server
2000, Anybody can explain each join with definition..Thanks
in advance....
Answer Posted / j.jyothy
Already i explained 3 joins now i tell u Outerjoins.
leftouterjoin:It will display all the rows of left table
irrespective of whether there is a match in the right or
not.If there is no match in the right table then the null
row is aasumed and it is displayed in the output.
Display all emps in the emptable.
select empno,ename,esal,e.deptno,d.deptno,dname,loc from
emp e left outerjoin dept d on e.deptno=d.deptno
RightOuterJoin:It will display all the rows of right table
irrespective of whether there is a match in the right or
not.If there is no match in the Left table then the null
row is aasumed and it is displayed in the output
Example
select empno,ename,esal,e.deptno,d.deptno,dname,loc from
emp e right outerjoin dept d on e.deptno=d.deptno
| Is This Answer Correct ? | 23 Yes | 18 No |
Post New Answer View All Answers
How do I find the sql server instance name?
Distinguish between nested subquery and correlated subquery?
Can you pass expressions to stored procedure parameters?
OPTIMIZATION OF SP,CURSOR,TRIGGERS
How to copy the tables, schema and views from one sql server to another?
What does top operator do?
Do you know what is a trace frag? Where do we use it?
What are the dmvs? : sql server database administration
What is the name of the Database which IBM mainframe uses?
What is indexed view?
What is a DBMS, query, SQL?
How to get a list of columns in a view using the "sp_columns" stored procedure?
what are different types of backups available in sql server? Given a particular scenario, how would you go about choosing a backup plan? : Sql server database administration
What is ms sql server index?
What xml support does the sql server extend?