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 |
what is diffrence b/w file-aid tool and file-aid utility???
how to delete perticular row from table for ex. how you will delete 3rd row from table please answer THANKS IN ADVANCE
What is the difference between oracle and db2?
What is a db2 schema?
For a db2 column that is being defined as decimal (11, 2), discuss the cobol picture clause.
The only place of VSAM KSDS in DB2 is?
max number of columns in a db2 table?
how will i display the duplicate record's from a table... i don't want to eliminate ...i want to display the duplicate record...for example in my table i have 10 record's like record no(1,2,3,4,2,9,6,1) in this ...so i want to receive duplicates...
Is it mandatory to use DCLGEN? If not, why would you use it at all?
What is a plan and package in db2?
What is lock contention?
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?