Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.
select count(*) from (select distinct col1 , col2 from table)
in order to see if it comes with a subquery factoring bug ?drop table tab1 purge;
create table tab1(col1 char(1), col2 char(1));
insert into tab1 values('a','b');
insert into tab1 values('a','c');
insert into tab1 values('a','c');
commit;
select distinct col1, col2 from tab1;
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Join the community of 500,000 technology professionals and ask your questions.