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 should be specified along with a cursor in order to continue updating process after commit?
query to just fetch first matching row and stop execution. once one matching row is found ..no more records should be checked.. if the first record is matching.. the query must stop
When is the results table for the query in a DECLARE CURSOR statement created?
Where could you look if you had a question about whether a column has been defined as an index?
Do we have any optinon to search part of integer in DB2 as we have for character Like,SUBSTR optins?
How does cobol compile db2 program?
List out the buffer pools in db2
How many clustering indexes can be defined for a table?
Generally if I want to select the names starting with c I need to use c% But how could I code to select the data which contains % as a part of data.
What is isolation level?
How can we retrieve the total number of records in RPG & CLLE?
How do you simulate the explain of an embedded sql statement in spufi/qmf?