250+ TOP MCQs on Creating, Dropping, Indexing and Altering Tables and Answers

MySQL Database Multiple Choice Questions on “Creating, Dropping, Indexing and Altering Tables”.

1. Which statement is used to remove indexes on tables?
a) DROP INDEX
b) DELETE INDEX
c) REMOVE INDEX
d) FLUSH INDEX

Answer: a
Clarification: MySQL provides statements to change the structure of tables. To add or remove the indexes on the existing database tables, the ‘CREATE INDEX’ and ‘DROP INDEX’ tables are used.

2. Which storage engine is not available in MySQL 5.0?
a) InnoDB
b) ARCHIVE
c) Falcon
d) NDB

Answer: c
Clarification: All of the storage engines given are available in MySQL versions 5.0 and above, except ‘Falcon’. MySQL supports many storage engines or table handlers that have a specific set of properties.

3. The default storage engine used is ____________
a) EXAMPLE
b) ARCHIVE
c) MyISAM
d) NDB

Answer: c
Clarification: MySQL comes with multiple storage engines. The default storage engine used is ‘MyISAM’. ‘EXAMPLE’ is the stub storage engine, NDB is the storage engine for MySQL Cluster.

4. What is the name of the format file for a table named my_tbl?
a) my_tbl.fmt
b) my_tbl.frm
c) my_tbl.fmr
d) my_tbl.ftm

Answer: b
Clarification: Every time a table is created in MySQL, it creates a disk file containing the format of the table. It has two components, namely, base name (here, ‘my_tbl’) and an extension (here, ‘frm’).

5. In the CREATE TABLE statement, the engine name specified is case sensitive.
a) True
b) False

Answer: b
Clarification: Suppose a table is created using the following statement: ‘CREATE TABLE my_tbl (…..) ENGINE = InnoDB;’. The engine name ‘InnoDB’ used is always case insensitive.

  250+ TOP MCQs on Condition Types and Answers

6. Which keyword is used to create a table as a temporary copy of itself?
a) TEMP
b) TEMPO
c) TEMPR
d) TEMPORARY

Answer: d
Clarification: The ‘CREATE TABLE’ clause has a very vast formal format, although its usage is extremely simple and intuitive. One of the many ways is to create a table as a temporary copy of itself.

7. Which storage engine enables to access tables from a MySQL server managed by another server?
a) InnoDB
b) EXAMPLE
c) MyISAM
d) FEDERATED

Answer: d
Clarification: There are many storage engines that are used in MySQL. By default, MyISAM is used as the storage engine unless specified otherwise. FEDERATED enables access to a foreign MySQL server.

8. It is possible to drop multiple tables in the same statement.
a) True
b) False

Answer: a
Clarification: To drop a table, all that is required is the table name. No additional information like table format or type is necessary. Multiple tables are dropped in the same DROP TABLE statement.

9. The default index type for MEMORY tables is __________
a) HASH
b) SPATIAL
c) FULLTEXT
d) UNIQUE

Answer: a
Clarification: The ‘HASH’ index is the default index type for ‘MEMORY’ tables. ‘SPATIAL’ can only be used with ‘MyISAM’ tables for the spatial data types. ‘FULLTEXT’ is used for performing full-text searches.

10. The statement to change the table name is __________
a) CHANGE
b) CHANGENAME
c) CHANGENM
d) RENAME

Answer: d
Clarification: To change the name of a table, the keyword ‘RENAME’ can be used. It can be used with the ‘ALTER TABLE’ clause. It can also be used as a statement in itself like ‘RENAME TABLE old_tbl new_tbl’.

  250+ TOP MCQs on Character Set Support and Answers

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top