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
Post a Comment