MCQs for Informatics Practices Class 12 with Answers Querying and SQL Functions

Students of class 12 Informatics Practices should refer to MCQ Questions Class 12 Informatics Practices Querying and SQL Functions with answers provided here which is an important chapter in Class 12 Informatics Practices NCERT textbook. These MCQ for Class 12 Informatics Practices with Answers have been prepared based on the latest CBSE and NCERT syllabus and examination guidelines for Class 12 Informatics Practices. The following MCQs can help you to practice and get better marks in the upcoming class 12 Informatics Practices examination

Chapter Querying and SQL Functions MCQ with Answers Class 12 Informatics Practices

MCQ Questions Class 12 Informatics Practices Querying and SQL Functions provided below have been prepared by expert teachers of grade 12. These objective questions with solutions are expected to come in the upcoming Standard 12 examinations. Learn the below provided MCQ questions to get better marks in examinations.

Question: An aggregate function:
a) Takes a column name as its arguments
b) May take an expression as its argument
c) Both (a) and (b)
d) None of (a) and (b)

Answer

C

Question: Which of the following are correct aggregate functions in SQL
(a) AVERAGE()
(b) MAX()
(c) COUNT()
(d) TOTAL()   

Answer

b)And c)

Question: All aggregate functions ignore NULLs except for the __________ function.
(a) Distinct
(b) Count(*)
(c) Average()
(d)None of these 

Answer

A

Question: Identify the correct INSERT queries from the following :
(a) INSERT INTO Persons(‘xxx1’, ‘yyy1’);
(b) INSERT INTO Persons(LastName, FirstName) Values (‘xxx’, ‘yyy’);
(c) INSERT INTO Persons Values(‘xxx1’ , ‘yyy1’);
(d) INSERT INTO Persons Value(‘xxx1’ , ‘yyy1’); 

Answer

b)And c)

Question: What is the meaning of “HAVING” clause in SELECT query.
(a) To filter out the summary groups.
(b) To filter out the column groups.
(c) To filter out the row and column values.
(d) None of the mentioned. 

Answer

A

Question: Aggregate functions can be used in the select list or the ____ clause of the select statement.
They cannot be used in a _______ clause.
(a) Where, having
(b) Having, where
(c) Group by, having
(d) Group by where 

Answer

C

Question: What will be returned by the given query ?
SELECT INSTR(‘INDIA’, ‘DI’);
(a) 2
(b) 3
(c) -2
(d) -3 

Answer

B

Question: Which of the following is not a text function?
(a) TRIM ()
(b) TRUNCATE()
(c) LEFT()
(d) MID () 

Answer

B

Question: What will be returned by the given query?
SELECT month(‘2020-05-11’);
(a) 5
(b) 11
(c) May
(d) November 

Answer

A

Question: What will be returned by the given query ?
SELECT ROUND(153.669,2);
(a) 153.6
(b) 153.66
(c) 153.67
(d) 153.7 

Answer

C

Question: Which of the following will give the same answer irrespective of the NULL values in the specified column:
a) MIN()
b) MAX()
c) SUM()
d) None of the above

Answer

C

Question. The correct output of mysql>SELECT TRIM(LEADING ‘&’ FROM ‘&&& India &&& ‘);
a) India &&
b) India &&&
c) && India
d) &&& India

Answer

B

Question: HAVING is used in conjunction with
a) WHERE
b) GROUP BY clause
c) Aggregate functions
d) None of the above

Answer

B

Question. What will be returned by the given query ? SELECT INSTR(‘INDIA’, ‘DI’);
a) 2
b) 3
c) −2
d) −3

Answer

B

Question. Which of the following is the correct syntax of LCASE( ) function?
a) LCASE(row_name)
b) LCE(column_name)
c) LCASE(str/column_name)
d) None of the above

Answer

C

Question. What is the significance of the statement “HAVING COUNT (emp_id)>2” in the following MySQL statement? SELECT name, COUNT (emp_id),emp_no FROM department GROUP BY name HAVING COUNT (emp_id)>2;
a) Filter out all rows whose total emp_id below 2
b) Selecting those rows whose total emp_id>2
c) Both a) and b)
d) None of the mentioned 

Answer

C

Question. What will be the order of sorting in the following MySQL statement? SELECT emp_id, emp_name FROM person ORDER BY emp_id, emp_name;
a) Sorting {emp_id, emp_name}
b) Sorting {emp_name, emp_id}
c) Sorting {emp_id} but not emp_name
d) None of the mentioned 

Answer

A

Question: JOIN in RDBMS refers to
a) Combination of multiple columns
b) Combination of multiple rows
c) Combination of multiple tables
d) Combination of multiple databases

Answer

C

Question: Referential integrity
a) Must be maintained
b) Cannot be maintained
c) Is automatically maintained by databases
d) Should not be maintained

Answer

A

Question. In which function, NULL values are excluded from the result returned?
a) SUM()
b) MAX()
c) MIN()
d) All of these 

Answer

D

Question. Find odd one out?
a) GROUP BY
b) DESC
c) ASC
d) ORDER BY   

Answer

A

Question. Which of the following function returns an integer that indicates the position of the first occurrence of the sub-string within the string?
a) INSTR( )
b) RTRIM( )
c) LENGTH( )
d) TRIM( )

Answer

A

Question: Equi-join is formed by equating
a) Foreign key with Primary key
b) Each row with all other rows
c) Primary key with Primary key
d) Two tables

Answer

A

Question: In the FROM clause of a SELECT statement
a) Multiple Column Names are specified.
b) Multiple table names are specified
c) Multiple Column Names may be specified.
d) Multiple table names may be specified.

Answer

A

Question. Which aggregate function returns the count of all rows in a specified table?
a) SUM()
b) DISTINCT()
c) COUNT()
d) None of these 

Answer

C

Question. Which of the following is not an aggregate function?
a) AVG()
b) ADD()
c) MAX()
d) COUNT() 

Answer

B

Question. Which of the following function converts the characters of an argument string to the uppercase   characters ?
a) UCASE( )
b) UPPER( )
c) Both (a) and (b)
d) None of the above

Answer

C

Question: Primary Key of a table can be
a) Defined at the time of table creation only.
b) Defined after table creation only.
c) Can be changed after table creation
d) Cannot be changed after table creation

Answer

A

Question. What is the significance of “ORDER BY” in the following MySQL statement? SELECT emp_id, fname, lname FROM person ORDER BY emp_id;
a) Data of emp_id will be sorted
b) Data of emp_id will be sorted in descending order
c) Data of emp_id will be sorted in ascending order
d) All of the mentioned 

Answer

C

Question. Which clause is used with an “aggregate functions”?
a) GROUP BY
b) SELECT
c) WHERE
d) Both (a) and (c) 

Answer

A

Question: A Primary key column
a) Can have NULL values
b) Can have duplicate values
c) Both (a) and (b)
d) Neither (a) nor (b)

Answer

D

Question. What is the significance of the statement “GROUP BY d.name” in the following MySQL statement? SELECT name, COUNT (emp_id), emp_no FROM department GROUP BY name;
a) Counting of the field “name” on the table “department”
b) Aggregation of the field “name” of table “department”
c) Sorting of the field “name”
d) None of the mentioned 

Answer

B

Question. Which clause is similar to “HAVING” clause in MySQL?
a) SELECT
b) WHERE
c) FROM
d) None of the mentioned 

Answer

B

Question: Two SELECT commands in a UNION
a) Should select same number of columns.
b) Should have different number of columns
c) Both (a) and (b)
d) Neither (a) nor (b)

Answer

C

MCQs-for-Informatics-Practices-Class-12-with-Answers-Sql-Grouping-Records and-Table-Joins.jpg

We hope the above multiple choice questions for Class 12 Informatics Practices for Chapter Sql Grouping Records and Table Joins provided above with answers based on the latest syllabus and examination guidelines issued by CBSE, NCERT and KVS are really useful for you. Sql Grouping Records and Table Joins is an important chapter in Class 12 as it provides very strong understanding about this topic. Students should go through the answers provided for the MCQs after they have themselves solved the questions. All MCQs have been provided with four options for the students to solve. These questions are really useful for benefit of class 12 students. Please go through these and let us know if you have any feedback in the comments section.

Related Posts

error: Content is protected !!