Thursday, 27 May 2021

1 - Class 12 CS and IP Objective Type Revision Class - 1

 

DBMS – CLASS 12 CS and IP

MCQ:


1.      What will be the order of the data being sorted after the execution of given SQL query?

SELECT * FROM STUDENT ORDER BY ROLL_NO;

A).   Custom Sort

B).   Descending

C).   Ascending

D).   None of These

 

2.      Which values will not be considered by SQL while executing the following statements?

SELECT COUNT () FROM DEPARTMENT;

A).   Numeric Value

B).   Text Value

C).   Null Value

D).   Date Value


NOTE: Query should be

SELECT COUNT (Column_Name) FROM DEPARTMENT;

3.      Which of the following clauses is used to sort the result set?

A).   SORT BY

B).   GROUP BY

C).   ARRANGE BY

D).   ORDER BY


4.      Which clause is used in query to place the condition on groups in MYSQL?

A).   Where

B).   Having

C).   Group By

D).   Both A and B

 

5.      If column “Marks” contains the data set {25, 35, 25, 35, 38}, what will be the output after the execution of the given query?

SELECT MARKS (DISTINCT) FROM STUDENTS;

A).   25, 35, 25, 35, 38

B).   25, 25, 35, 35, 38

C).   25, 35, 38

D).   25, 25, 35, 35


NOTE: Query should be

SELECT DISTINCT MARKS FROM STUDENTS;


6.      If column “Salary” contains the data set {10000, 15000, 25000, 10000, 15000}, what will be the output after the execution of the given query?

SELECT SUM (DISTINCT SALARY) FROM EMPLOYEE;

A).   75000

B).   25000

C).   10000

D).   50000


7.      What SQL statement do we use to display the record of all students whose last name contains 5 letters ending with “A”?

A).   SELECT * FROM STUDENTS WHERE LNAME LIKE ‘_ _ _ _ A’;

B).   SELECT * FROM STUDENTS WHERE LNAME LIKE ‘_ _ _ _ _’;

C).   SELECT * FROM STUDENTS WHERE LNAME LIKE ‘????A’;

D).   SELECT * FROM STUDENTS WHERE LNAME LIKE ‘*A’;

 

8.      What SQL statement do we use to find the total number of records present in the table Product?

A).   SELECT * FROM PRODUCT;

B).   SELECT COUNT (*) FROM PRODUCT;

C).   SELECT FIND (*) FROM PRODUCT;

D).   SELECT SUM () FROM PRODUCT;

 

9.      Which of the following functions is not an aggregate function?

A).   Round()

B).   Sum()

C).   Count()

D).   AVG()

 

10.   Which of the following function is used to find the largest value from the given data in MYSQL?

A).   MAX()

B).   MAXIMUM()

C).   LARGEST()

D).   BIG()

 


        CLICK HERE FOR VIDEO EXPLANATION OF THESE QUESTIONS


Answer:

1.      C

2.      C

3.      D

4.      B

5.      C

6.      D

7.      A

8.      B

9.      A

10.   A


No comments:

Post a Comment