var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: need help on selecting distinct values
I have two tables a and b
When i do select a.x from a,b where a.y=b.y it will return me
I need only distinct values without using the distinct command.
How is this possible?
Why don't you want to use distinct ????
What version, platform, fixpak of db2 are you on ?
Looks like an assignment question ..
Visit the new-look IDUG Website
, register to gain access to the excellent content.
using GROUP BY
Originally Posted by lifzgud
select a.x from a,b where a.y=b.y
GROUP BY a.x
lifzgud, Here is another way:
WHERE EXISTS(SELECT *
WHERE A.Y = B.Y
Also looks good...
where a.y in (select y from b)