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
Describe major components of db2?
What is iseries database?
What is the difference between nvl and coalesce?
What is the role of union all and union
What is the maximum No of rows per page?
Explain correlated sub-queries.
What is concurrency?
What is the use of db2?
What is sqlca’s maximum length?
What is nvl in db2?
How do I add a column to a table in db2?
What is the difference between using bind () and rebind () methods of naming class?
What is query_cache_limit?
What is the use of commit in db2?
What is the maximum number of columns in a db2 table?