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?
Answers were Sorted based on User's Feedback
Answer / virender
SELECT(*) Will return 10 and SELECT (distinct dept) will
return 8.
| Is This Answer Correct ? | 7 Yes | 2 No |
Answer / 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 |
Answer / abhilash
SELECT(*) Will return 10 and SELECT (distinct dept) will
return 8.
| Is This Answer Correct ? | 0 Yes | 0 No |
Why db2 is called db2?
What is access path in db2?
What are the advantages of using a PACKAGE?
What is SPUFI?
How would you move a tablespace (using STOGROUP) to a different DASD volume allocated to that tablespace?
How do run the JCL which has 25 steps by skipping the following steps 5, 10,15 and 25 without using COND statement
in db2, already 10 columns arie der, and i want to insert 11th column. what parameters u wil consider for insertion and how will u insert
What is an access path?
How to solve S0C7 abend with out using DISPlay in 10 mins?
Which catalog tables contain authorization information?
Can I use LOCK TABLE on a view?
what is difference between Plan and Package