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 copy pending status in db2?
What is the use of with ur in db2?
How would the varchar column remarks defined?
What is catalog database in db2?
Which component is responsible for db2 startup and shutdown?
What is innodb buffer pool?
Mention some fields that are a part of sqlca.
How do you stop a db2 database in linux?
What is difference between rollback and commit?
What is collection in db2 bind?
What is a db2 tablespace?
How to connect to db2 database from windows command line?
Mention the location where the output received from explain statement is stored.
What db2 400?
How to get the ddl of a table in db2?