MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

SQL

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
How many records will the following SQL statement produce?SELECT Dept ____ ID, Title ____ IDFROM Department, JobTitle;
A
5
B
13
C
18
D
65
Explanation: 

Detailed explanation-1: -COUNT(*) with GROUP BY returns the number of rows in each group. This includes NULL values and duplicates. COUNT(ALL <expression>) evaluates expression for each row in a group, and returns the number of nonnull values.

Detailed explanation-2: -In SQL, you can make a database query and use the COUNT function to get the number of rows for a particular group in the table. Here is the basic syntax: SELECT COUNT(column name) FROM table name; COUNT(column name) will not include NULL values as part of the count.

There is 1 question to complete.