Different Questions on Joins:
CREATE TABLE [dbo].[one]
(
[x] [varchar](10) NULL
)
CREATE TABLE [dbo].[two]
(
[y] [varchar](10) NULL
)
insert into one values ('A'),('B'),('C'),('C')
insert into two values ('A'),('B'),('C'),('D')
Table one Table Two

Select X,Y from one inner join two on x=y
Result:
Select X,Y from one left outer join two on x=y
Result:
Select X,Y from one right outer join two on x=y
Result:
Select X,Y from one full outer join two on x=y
Result:
CREATE TABLE [dbo].[one]
(
[x] [varchar](10) NULL
)
CREATE TABLE [dbo].[two]
(
[y] [varchar](10) NULL
)
insert into one values ('A'),('B'),('C'),('C')
insert into two values ('A'),('B'),('C'),('D')
Table one Table Two

Select X,Y from one inner join two on x=y
Result:
Select X,Y from one left outer join two on x=y
Result:
Select X,Y from one right outer join two on x=y
Result:
Select X,Y from one full outer join two on x=y
Result:





No comments:
Post a Comment