InterviewSolution
Saved Bookmarks
| 1. |
How to use distinct and count in SQL query? Explain |
|
Answer» count(): It returns the NUMBER of rows in a table satisfying the condition SPECIFIED in the WHERE clause. It would return 0 if there were no MATCHING conditions. Syntax: distinct(): It is used to return only different values. In a table, a column often contains many duplicate values, and sometimes we want to list the different values. It can be used with aggregates functions. Syntax:
This information was frequently asked during SQL interview QUESTIONS for testers. |
|