Tutorial 5: Some Useful (sample )join queries (specially for monetdb)


select * from (select 'a' as b,'c' as "c") as t1  left join (select 'b' as b,'d' as "d") as t2 using (b);
select * from (select 'a' as b,'c' as "c") as t1  left join (select 'a' as b,'d' as "d") as t2 using (b);
select * from (select 'a' as b,'c' as "c") as t1 right join (select 'a' as b,'d' as "d") as t2 using(b);
select * from (select 'a' as b,'c' as "c") as t1 right join (select 'b' as b,'d' as "d") as t2 using(b);
select * from (select 'a' as b,'c' as c) as t1 full join (select 'a' as b,'d' as d) as t2 using (b);
select * from (select 'a' as b,'c' as c) as t1 full join (select 'b' as b,'d' as d) as t2 using (b);
select * from (select 'a' as b,'c' as "c") as t1 natural full join (select 'a' as b,'d' as "d") as t2;
select * from (select 'a' as b,'c' as "c") as t1 natural full join (select 'b' as b,'d' as "d") as t2;
select * from (select 'a' as b,'c' as "c") as t1 natural left join (select 'a' as b,'d' as "d") as t2;
select * from (select 'a' as b,'c' as "c") as t1 natural left join (select 'b' as b,'d' as "d") as t2;
select * from (select 'a' as b,'c' as "c") as t1 natural right join (select 'a' as b,'d' as "d") as t2;
select * from (select 'a' as b,'c' as "c") as t1 natural right join (select 'b' as b,'d' as "d") as t2;

Comments

Popular posts from this blog

Tumblr posts about sexplanation, DoeEyes and Dr. Lindsay Doe

बैगन

Type of Common Charts used in visualization