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 |
How and when does the db2 enforces the unique key?
Is db2 relational database?
what is the difference between where clause and having clause
What is a page?
what needs to be done if a table is in copy pending / check pending status?
is it compulsory commitment control in journal?
What is dynamic SQL?
What is table space in db2?
How can tablespace be moved to another dasd volume that is allocated for that tablespace?
How we create a tables in DB2 ?Previously client has using 7 letters for user id,now he wants to increase the letters from 7 to 12 for user id.How we can do it?
database DSNDB01 means a.db2 catalog b.db2 directory c.BSDS d.active logs answer with reason please
how to fetch multiple records without using cursor