- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is the result of count function in the NULL value present in DB2 table?
The COUNT function in DB2 is used to return the number of rows which satisfies the given criteria. The GROUP BY is used to divide the rows in the groups based on the criteria given in the query.
If we perform the GROUP BY on INVOICE_ID and there are few rows having NULL value in INVOICE_ID then the null values form a separate group. For example, if we have below table.
On executing the query which performs GROUP BY on INVOICE_ID and counts the number of rows, we will get the result below.
SELECT INVOICE_ID, COUNT(*) AS INVOICE COUNT FROM ORDERS GROUP BY INVOICE_ID;
- What is NULL check and insertion rule in a DB2 table?
- What is the purpose of “NOT NULL WITH DEFAULT” clause used in DB2 table column?
- What is the use of the VALUE function in a DB2? Explain with the help of an example
- How to store a NULL value in a particular column of a DB2 table using COBOL-DB2 program?
- Display the result with not null value first and then with null value in MySQL
- What is the difference between Market Value and Present Value?
- What is the definition and usage of alternate key in a DB2 table?
- What MySQL MAKE_SET() function returns if the value of the bit is 1 and the first string is NULL?
- What will happen if a NULL value is detected for a SQL statement in COBOL-DB2 program and the NULL indicator is not used?
- What is the significance of ACCESSTYPE and INDEXONLY column of a PLAN table in DB2?
- Find the count of EMPTY or NULL columns in a MySQL table?
- What will be the result if SQLCA is not included in a COBOL-DB2 program?
- What is Adjusted Present Value approach?
- What MySQL returns if the argument of QUOTE() function is NULL?
- What is the execution result when a DB2 program is compiled and binded on separate days?