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
What are the different authentication modes in sql server? How can it be changed?
How to create hyperlink from returned sql query ?
What is the optimal disk configuration for a database server and what raid configurations would you use if budget is not a constraint?
What are the purpose of Normalisation?
What is single-user mode?
What is dimension table? : sql server analysis services, ssas
How to use transact-sql statements to access the database engine?
When columns are added to existing tables, what do they initially contain?
What is the recovery model?
Is sql different from sql server?
What type of locking occurs during the snapshot generation? : sql server replication
Differentiate sql server reporting services vs. Crystal reports?
What is the guest user account in sql server? What login is it mapped to it? : sql server security
What are the different types of lock modes in sql server 2000?
what's sql server? : Sql server database administration