create table table11(id integer identity,name varchar(50),address varchar(50))
insert into table11 values('d','coimbatore')
select * from table11
create table table22(id integer identity,name varchar(50),salary integer)
insert into table22 values('q',3000)
select * from table22
outer join three types they are left,right,full outer join
Left Join:
select table11.name,table22.name from table11 left join table22 on table11.name=table22.name
Right join:
select table11.name,table11.address ,table22.name from table11 right join table22 on table11.name=table22.name
Full Outer join:
select table11.name,table11.address,table22.name,table22.salary from table11 full outer join table22 on table11.name=table22.name
// inner join it display only matched items
select table11.name ,table22.name from table11 inner join table22 on table11.name=table22.name
//cross join 0,0 0,1 1,0 1,1
select table11.name ,table22.name ,table11.id,table22.id,table11.address,table22.salary from table11 cross join table22
insert into table11 values('d','coimbatore')
select * from table11
create table table22(id integer identity,name varchar(50),salary integer)
insert into table22 values('q',3000)
select * from table22
outer join three types they are left,right,full outer join
Left Join:
select table11.name,table22.name from table11 left join table22 on table11.name=table22.name
Right join:
select table11.name,table11.address ,table22.name from table11 right join table22 on table11.name=table22.name
Full Outer join:
select table11.name,table11.address,table22.name,table22.salary from table11 full outer join table22 on table11.name=table22.name
// inner join it display only matched items
select table11.name ,table22.name from table11 inner join table22 on table11.name=table22.name
//cross join 0,0 0,1 1,0 1,1
select table11.name ,table22.name ,table11.id,table22.id,table11.address,table22.salary from table11 cross join table22
No comments:
Post a Comment