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 are the copybook changes generally we done?can anyone tell me......... Thanks in advance........
What's the difference between DB2 active log and archive log? Thanks a lot...
What is check constraint. Explain with example.
in GDG: is it poosible to copy records from a file which utilizes some 100 cylinders to a gdg whose model is defined as trk(1,0) and also it possible to copy 100 bytes file to 80 bytes file?
What if we fail to give values in columns declared as NOT NULL ?
The only place of VSAM KSDS in DB2 is?
What is the difference between a package and a plan?
6 Answers Infosys, L&T, Mphasis,
What is a page in db2?
What is syscat in db2?
What is access path in db2?
which is the most efficient tablespace?? a.simple tablespace. b.partitioned tablespace. c.segmented tablespace. d.none of the above. please post answer with the reason.?
What is the use of predicate?