1. Which SQL statement is used to create a new table in MySQL?
a) CREATE DATABASE
b) CREATE TABLE
c) INSERT INTO
d) ALTER TABLE
Answer: b) CREATE TABLE
2. Which of the following is NOT a type of constraint used in Data Definition in MySQL?
a) PRIMARY KEY
b) FOREIGN KEY
c) INSERT
d) UNIQUE
Answer: c) INSERT
3. What does the ALTER TABLE command do in MySQL?
a) Deletes an existing table
b) Modifies an existing table structure
c) Adds data into a table
d) Creates a new table
Answer: b) Modifies an existing table structure
4. Which MySQL command is used to remove a table from a database?
a) DELETE
b) DROP
c) REMOVE
d) TRUNCATE
Answer: b) DROP
5. Which SQL statement is used to retrieve data from a MySQL table?
a) UPDATE
b) SELECT
c) INSERT
d) DELETE
Answer: b) SELECT
6. In MySQL, which SQL statement is used to insert data into a table?
a) INSERT INTO
b) UPDATE
c) SELECT INTO
d) MODIFY
Answer: a) INSERT INTO
7. What is the correct syntax to update an existing record in a table?
a) UPDATE table_name SET column1 = value1 WHERE condition;
b) MODIFY table_name SET column1 = value1 WHERE condition;
c) INSERT INTO table_name SET column1 = value1 WHERE condition;
d) UPDATE table_name VALUES column1 = value1 WHERE condition;
Answer: a) UPDATE table_name SET column1 = value1 WHERE condition;
8. Which MySQL client program allows users to interact with the database from a command-line interface?
a) MySQL Workbench
b) phpMyAdmin
c) MySQL Command-Line Client
d) MySQL Query Browser
Answer: c) MySQL Command-Line Client
9. What is the purpose of the TRUNCATE command in MySQL?
a) To remove a table
b) To remove all rows from a table without removing the table itself
c) To delete specific records based on conditions
d) To permanently remove a database
Answer: b) To remove all rows from a table without removing the table itself
10. Which of the following client programs allows for graphical management and design of MySQL databases?
a) MySQL Command-Line Client
b) MySQL Workbench
c) phpMyAdmin
d) Both b and c
Answer: d) Both b and c
Apply Now!
https://www.vskills.in/certification/certified-mysql-db-administrator