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 to add additional conditions in SQL?
How to enforce security in sql server? : sql server security
What method is used by the Command classes to execute SQL statements that return single values?
What are policy management terms?
What are the different types of backups avaialabe in sql server 2005?
How do I view a trc file?
Explain what is use of dbcc commands?
How is foreign key related to primary key?
What are Row versions of DataRow?
Can you explain how long are locks retained within the repeatable_read and serializable isolation levels, during a read operation with row-level locking?
Explain the functionalities that views support?
How do you clear a log file?
What is the default sql server instance name?
Does hive support indexing?
Explain powershell included in sql server 2008?