MySQL Questions and Answers – Populating & Modifying Tables – 3

This set of MySQL Multiple Choice Questions & Answers (MCQs) focuses on “Populating & Modifying Tables – 3”.

1. Which statement is used for updating existing information in the table?
a) UPDATE
b) WHERE
c) MODIFY
d) ALTER
View Answer

Answer: a
Explanation: None.

2. Which statement is used to delete an existing row from the table?
a) DELETE
b) WHERE
c) MODIFY
d) None of the mentioned
View Answer

Answer: a
Explanation: None.

3. In the following MySQL command how many rows will be updated?

advertisement
advertisement
   UPDATE person
   SET lname=’s’,
   Fname = ’p’,
   WHERE person_id = 1;
   /* person_id is a primary key */

a) Single row
b) Double row
c) No row
d) None of the mentioned
View Answer

Answer: a
Explanation: None.
Note: Join free Sanfoundry classes at Telegram or Youtube

4. In the following MySQL command how many rows will be updated?

   UPDATE person
   SET lname=’s’,
   Fname=’p’,
   WHERE person_id<10;
   /* person_id is a primary key */

a) 0-9
b) 1-6
c) No row
d) None of the mentioned
View Answer

Answer: a
Explanation: None.
advertisement

5. In the following MySQL command how many rows will be deleted?

advertisement
DELETE person
WHERE person_id=1;
/*person_id is a primary key */

a) 1
b) 0
c) No row
d) None of the mentioned
View Answer

Answer: a
Explanation: None.

6. In the following MySQL command how many rows will be deleted?

DELETE person
WHERE person_id<10;
/*person_id is a primary key */

a) 0-9
b) 1-7
c) No row
d) None of the mentioned
View Answer

Answer: a
Explanation: None.

7. “INSERT” is same as “UPDATE”?
a) NO
b) YES
c) May be
d) None of the mentioned
View Answer

Answer: a
Explanation: “INSERT “is used to entering the data in the newly created table while “UPDATE” is used to modify the data which is already inserted with help of statement “INSERT”.

8. Which clause is used to rename the existing table?
a) RENAME
b) MODIFY
c) ALTER
d) None of the mentioned
View Answer

Answer: a
Explanation: None.

9. Which of the following functions are not performed by “ALTER” clause?
a) Change the name of the table
b) Change the name of the column
c) Drop a column
d) All of the mentioned
View Answer

Answer: d
Explanation: None.

Sanfoundry Global Education & Learning Series – MySQL Database.

To practice all areas of MySQL Database, here is complete set of 1000+ Multiple Choice Questions and Answers.

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.