Different Types Of JOINS:
Most of the joins you will come across are based on
equality, with the equijoin being the most dominant.
In this chapter you learned about equijoins; there are
other types of joins you must become familiar with, most
notably the self-join, the nonequijoin, and the outer join.
Equijoin or Inner Join (Equality) : Traditional comma-
separated join or ANSI JOIN syntax (including optional
INNER keyword).
Natural Join (Equality) : NATURAL JOIN keyword.
Cross-Join or Cartesian Product (No join condition):
Traditional comma-separated with the missing join condition
in the WHERE clause or CROSS JOIN keyword.
Self-Join (Equality): Equijoin or Inner Join.
Outer Join (left, right, full):(Equality and extending the
result set): "Complex Joins" OUTER JOIN keywords or outer
join operator(+).
Non-Equijoin (Nonequality of values): "Complex Joins"
Traditional comma-separated join or ANSI join syntax with
the ON clause.
The join criteria is not based on equality.
What are the all different types of Joins in SQL Server
2000, Anybody can explain each join with definition.
In SQL Server 2000 we have three types of joins
1. Inner join
2. Outer Join
3. Cross Join
1. Inner Join: Inner Join is the default type of join, it
will producesses the result set, which contains matched
rows only.
syntax: select * from table1table2
2. Outer Join: Outer join produces the results, which
contains matched rows and unmatched rows.
here we have three types of joins,
1.Left Outer Join 2.Right Outer Join 3.Full Outer Join
Left Outer Join: Left Outer Join producesses the results,
which contains all the rows from Left table and matched
rows from Right Table.
syntax: select * from table1table2
Right Outer Join: Right Outer Join producesses the
resultset, which contains all the rows from right table and
matched rows from left table.
syntax:select * from table1table2
Full Outer Join: Full Outer Join producesses the resultset,
which contains all the rows from left table and all the
rows from right table.
syntax:select * from table1table2
3.Cross Join: A join without having any condition is known
as Cross Join, in cross join every row in first table is
joins with every row in second table.
syntax: select * from table1table2
Self Join: A join joins withitself is called self join
working with self joins we use Alias tables.
What is the STUFF function and how does it differ from the
REPLACE function?
STUFF - Delete a specified length of characters and insert
another set of characters at a specified starting point.
For example: SELECT STUFF('asdfghjkl', 3, 5, 'XYZ')
Go
here the result set is:
asXYZkl
REPLACE - Replace all occurrences of the second given string
expression in the first string expression with a third
expression.
For Example: SELECT REPLACE('Abhay', 'a', 'KKT')
Here the result set is:
KKTbhKKTy
Can you link only other SQL Servers or any database servers
such as Oracle?
We can link any server provided we have the OLE-DB provider
from Microsoft to allow a link. For Oracle we have a OLE-DB
provider for oracle that microsoft provides to add it as a
What does it mean to have quoted_identifier on? What are the
implications of having it off?
when QUOTED_IDENTIFIER option is specified as ON ,the
identifiers are placed with in double quotation and
constants are placed with in single quotation.
when QUOTED_IDENTIFIER is OFF,the identifiers are not placed
with in double quotation and we must follow all T-SQL rules
for the identifiers.
linked server to the sql server group.
What is RAID and what are different types of RAID
configurations?
RAID stands for Redundant Array of Inexpensive Disks, used
to provide fault tolerance to database servers. There are
six RAID levels 0 through 5 offering different levels of
performance, fault tolerance.
Difference between Function and Procedure-in general?
Function can return at most one value at a time while
procedure can return more than one value at a time You can
use function within Sql Statement and you cannot use stored
procedure with in Sql Statement
wht is normalization?can u explain me in detail?
Normalization is the process of efficiently organizing data
in a database. There are two goals of the normalization
process: eliminating redundant data and ensuring data
dependencies make sense
For more FAQs log on to : http://www.allinterview.com/showanswers/36608.html
No comments:
Post a Comment