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 are types of indexes?
What is cursor with hold option in db2?
What is the picture clause of null indicator variable?
Explain how can you do the explain of a dynamic sql statement?
How do I import a csv file into db2?
What are the prerogatives?
How to test SQL -911 error while developing COB-DB2 program
Where can you declare a cursor in a cobol-db2 program?
Is db2 a database?
What is phantom read in db2?
How to find primary key of a table in db2?
What are the bind parameters ibm db2?
What is the difference between plan and package in db2?
Why do we use cursor?
Explain in detail about buffer manager and its functionalities?