Explore topic-wise MCQs in Mysql.

This section includes 21 Mcqs, each offering curated multiple-choice questions to sharpen your Mysql knowledge and support exam preparation. Choose a topic below to get started.

1.

In the following query person_id can be
SELECT Emp_id, fname,Lname, Birth_date FROM Employee
WHERE Emp_id=101;

A. Only Attribute but not a primary Key
B. Only Primary Key
C. Primary Key or any other Attribute
D. All of above
E. None of these
Answer» D. All of above
2.

What will be the output of the query given below?
SELECT emp_id, fname, lname
FROM employee
WHERE title='Manager AND start_date > 2016-03-20;

A. Columns mention with SELECT clause and only those rows which contain Manager as a title and start_date > 2016-03-20
B. All columns
C. Only those columns which are mention with SELECT clause
D. All of above
E. None of these
Answer» B. All columns
3.

What will be the output of the query given below?
SELECT *
FROM Army
WHERE (title= Sergeant ) OR (start_date=1995-03-20);

A. All rows belong to table employee
B. All columns and rows belong to table employee
C. All columns but only those rows which contain Sergeant as a title or 1995-03-20 as a start_date
D. All of above
E. None of these
Answer» D. All of above
4.

What will be the output of the query given below?
SELECT *
FROM Student
WHERE (title= Monitor ) AND (start_date=2019-01-25);

A. All columns but only those rows which contain Monitor as a title and 2019-01-25 as a start_date
B. All rows belong to table Student
C. All columns and rows belong to table Student
D. All of above
E. None of these
Answer» B. All rows belong to table Student
5.

What will be the output of the query given below?
SELECT *
FROM Student
WHERE title= Monitor ;

A. All columns don t belong to table Student
B. columns and rows belong to table Student
C. All columns but only those rows which contain Monitor as a title
D. All of above
E. None of these
Answer» D. All of above
6.

What will be the output of the query given below?
SELECT *
FROM employee
WHERE (title= HEAD TELLER ) OR (start_date > 2013-01-24);

A. All rows belong to table employee
B. All columns and rows belong to table employee
C. All columns but only those rows which contain HEAD TELLER as a title OR start_date are greater than 2013-01-24
D. All of above
E. None of these
Answer» D. All of above
7.

What will be the output of the query given below?
SELECT *
FROM Army
WHERE (title= Sergeant ) AND (start_date > 1995-03-20);

A. All columns but only those rows which contain Sergeant as a title and start_date are greater than 1995-03-20
B. All rows belong to table employee
C. All columns and rows belong to table employee
D. All of above
E. None of these
Answer» B. All rows belong to table employee
8.

What will be the output of the query given below?
SELECT Student_id, FirstName, LastName
FROM Student
WHERE title= Monitor AND start_date=2017-02-25;

A. Only those columns which are mention with SELECT clause
B. Columns mention with SELECT clause and only those rows which contain Monitor as a title and start_date as 2017-02-25
C. All columns
D. All of above
E. None of these
Answer» C. All columns
9.

What will be the output of the query given below?
SELECT Id, FirstName, LastName
FROM Student
WHERE title= Monitor ;

A. Columns mention with SELECT clause and only those rows which contain Monitor as a title
B. All columns
C. Only those columns which are mention with SELECT clause
D. All of above
E. None of these
Answer» B. All columns
10.

Which clause is used to filter out unwanted Groups ?

A. SELECT
B. WHERE
C. FROM
D. HAVING
E. None of these
Answer» B. WHERE
11.

Which clause is used to group rows together by common columns values ?

A. WHERE
B. FROM
C. GROUP BY
D. SELECT
E. None of these
Answer» D. SELECT
12.

Which clause is used to Filters out unwanted data ?

A. WHERE
B. FROM
C. ORDER BY
D. SELECT
E. None of these
Answer» B. FROM
13.

Which clause is used to Identifies table from which to draw table and how the table should be joined ?

A. WHERE
B. SELECT
C. FROM
D. ORDER By
E. None of these
Answer» D. ORDER By
14.

Which clause is used to determine which column to include in the query sets ?

A. ORDER BY
B. WHERE
C. FROM
D. SELECT
E. None of these
Answer» E. None of these
15.

Which among the following is not a query clause ?

A. FROM
B. ALTER
C. MODIFY
D. WHERE
E. None of these
Answer» E. None of these
16.

What is the meaning of the WHERE clause in Mysql?

A. Filtering out unwanted rows and columns from result set
B. Filtering out unwanted rows from result set
C. Filtering out unwanted columns from result set
D. All of above
E. None of these
Answer» C. Filtering out unwanted columns from result set
17.

MODIFY is used with which Query clause ?

A. ORDER BY
B. WHERE
C. ALTER
D. FROM
E. None of these
Answer» D. FROM
18.

Which clause is used to Modify the existing field of the table ?

A. MODIFY
B. SELECT
C. FROM
D. ALTER
E. None of these
Answer» E. None of these
19.

Which clause is used to sort the rows of the final result set by one or more columns ?

A. ORDER BY
B. HAVING
C. FROM
D. WHERE
E. None of these
Answer» B. HAVING
20.

What will be the output of the query given below?

A. Columns mention with SELECT clause and only those rows which contain Monitor as a title
B. All columns
C. Only those columns which are mention with SELECT clause
D. All of above
E. None of these
Answer» B. All columns
21.

In the following query person_id can be

A. Only Attribute but not a primary Key
B. Only Primary Key
C. Primary Key or any other Attribute
D. All of above
E. None of these
Answer» D. All of above