Can you explain the types of Joins that we can have with Sql
Server?
Answer Posted / hokar
In some situations we may need to pull data from one or
more related tables at a time. In such cases we use JOINs
to extract data from more than one table at a time and
display the information in a single result set.
There are several types of joins.(1)Inner Join
(2)Outer
Join------Right Outer Join,Left Outer Join, Full Outer Join
Inner join is used to link tables on a common column and
return records that match in those columns.
Right Outer Join displays all records from the table on
right most side of the JOIN clause whether or not there are
matching records in the Left table.
Left Outer Join displays all records from the table on the
left most side of the JOIN clause whether or not there are
matching records on the Right table.
Full Outer Join diplays all records from both right and
left tables.
Example: If we have a HR database with employee information
table, salary information table, sick days table etc, and
if we want to know which employee
have used more than 15 sick days, we would need the
information form sick days table and employee information
table in a single result set.
| Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
What is database architecture? : SQL Server Architecture
What are the pros and cons of putting a scalar function in a queries select list or in the where clause?
What are the rules to use the rowguidcol property to define a globally unique identifier column?
How to send email from database?
What is SQL Azure Firewall?
Retrieve the unique rows from table without using UNIQUE and DISTINCT keywords.
What is the need for indexing?
What is the difference between upgrade and migration in sql server?
You want your report to display a hyperlink that will take users to your intranet. How do you configure such a hyperlink?
What is trigger explain with program?
What are the basic features of a trigger in ms sql server?
What is the difference between a function and a stored procedure?
Can you explain what are commit and rollback in sql?
What are the different types of cursor?
What is indexing explain it with an example?