If a table has a column "dept" (declared to have nulls) and
there are 10 rows in the table of which 3 have a null value
in the dept column, what will select count(*) and select
count(distinct dept) return?
Answer Posted / madhuri tungal
select count(*) returns 10 --- this is right. But,
select count(distinct dept) returns 7. Because null values
are not considered as distinct.
| Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
What is cursor stability in db2?
In an sql table that is embedded, what is the procedure to retrieve rows that are part of a db2 table?
What is the usage of open cursor command?
How to restart a DB2 program?
What is cloudant database?
What is cobol db2?
Hi, i would like to start a new carrier in DB2 DBA.Which and what all step should i have to take..?
Suppose pgm A calling Pgm B .Pgm B has some Db2 program. at the time of compilation should plan and package will be created for both A and B or only B? What is the concept?
How does a cursor work?
What is the maximum size of a char data type in db2?
What is declare cursor?
What happens in bind step in a db2 program?
How do you eliminate duplicate values in db2?
What is with ur in db2?
What is an instance in db2?