Explore topic-wise MCQs in Mysql.

This section includes 5 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 how many rows will be updated?
UPDATE person
SET Lname= Gupta ,
Fname= Ajit ,
WHERE person_id < 10;
/* person_id is a primary key */

A. 1-6
B. No row
C. 0-9
D. All of above
E. None of these
Answer» D. All of above
2.

In the following query how many rows will be updated?
UPDATE Employee
SET Lname= Gupta ,
Fname = Ajit ,
WHERE Emp_id = 101;
/* person_id is a primary key */

A. Double row
B. No row
C. Single row
D. All of above
E. None of these
Answer» D. All of above
3.

What is the value of val2?
UPDATE t SET val1 = val1 + 2, val2 = val1;

A. val1 + 1
B. unchanged
C. updated val1
D. previous val1
E. None of these
Answer» D. previous val1
4.

In the following query how many rows will be updated?

A. 1-6
B. No row
C. 0-9
D. All of above
E. None of these
Answer» D. All of above
5.

What is the value of val2?

A. val1 + 1
B. unchanged
C. updated val1
D. previous val1
E. None of these
Answer» D. previous val1