We have listed here some multiple choice questions with answer on MySQL database, Which has asked by multiple companies like CTS, CSC, Dell, Polaris, Patni, Motorola etc.

You can prepare your job written and interview by using these sets of question fro here.

1. For a table having 4 columns, the number of columns to which hash function is applied when using hash indexes is __________
a) 1
b) 2
c) 3
d) 4

Answer: d

2. To check how MySQL would execute a SELECT query, which statement is used?
a) TELL
b) SHOW
c) DISPLAY
d) EXPLAIN

Answer: d

3. Which system variable tells the optimizer to skip certain plans based on estimates of the number of rows accessed for each table?
a) optimizer_prune_level
b) optimizer_search_depth
c) optimizer_search
d) optimizer_prune

Answer: a

4. To convert a string to an int, the function is _________________
a) INET_ATON()
b) INET_NTOA()
c) INET_ITOS()
d) INET_STOI()

Answer: a

5. Which of these columns are faster?
Variable length, Fixed length
a) same
b) variable length
c) fixed length
d) indeterminate

Answer: c

6. Which of these can be used to generate hash values?
a) MS5()
b) MA5()
c) MF5()
d) MD5()

Answer: d

7. Without LOCAL, LOAD DATA is _________________
a) more efficient
b) less efficient
c) same speed
d) arbitrary

Answer: a

8. Which option repairs MyISAM tables automatically after they open?
a) –myisam-recover=FORCE
b) –myisam-recover=STOP
c) –recover-myisam=FORCE
d) –recover-myisam=STOP

Answer: a

9. TO enable the compressed client/server protocol the option is _________________
a) –enable
b) –compress
c) –reduce
d) –restrict

Answer: b

10. How many of the following implement the default scheduling property of MySQL?
MyISAM, MERGE, MEMORY
a) 0
b) 1
c) 2
d) 3

Answer: d

11. The number of tables for which DELAYED works is _________________
MyISAM, MEMORY, ARCHIVE, BLACKHOLE
a) 1
b) 2
c) 3
d) 4

Answer: d

12. Which status indicator assesses how effective the table cache is?
a) Open_tables
b) Opened_tables
c) Close_tables
d) Closed_tables

Answer: b

13. To determine whether query cache is supported by the server the variable is _________________
a) have_query_cache
b) have_cache_query
c) query_cache_have
d) cache_query_have

Answer: a

14. Which mode tells cache queries that begin with SELECT SQL_CACHE?
a) 0
b) 1
c) 2
d) 3

Answer: c

15. Is duplicate entry of other attributes are allowed in SQL?
a) Yes
b) No
c) Depends
d) None of the mentioned

Answer: a

16. Which line of the following statements will produce error?
a) SELECT * FROM person WHERE person_id=1;
b) SELECT pname FROM person;
c) SELECT pname,lname, person_id FROM person;
d) None of the mentioned

Answer: d

17. Which among the following tags belong to Data definition language?
a) SELECT
b) FROM
c) WHERE
d) All of the mentioned

Answer: d

18. What jobs “Query Optimizer” perform in Mysql?
a) Determine the efficient way to execute a query
b) Syntax errors
c) Permissions
d) All of the mentioned

Answer: a

19. Which are the two languages used in Mysql?
a) DML/DDL
b) DDL/DCL
c) DML/DDM
d) None of the mentioned

Answer: a

20. Select the sequence for how the query mechanism works?
a) Authentication-> DDL->DML->query optimizer->output
b) DDL->DML->query optimizer-> Authentication->output
c) DML->query optimizer-> Authentication-> DDL-> output
d) All of the mentioned

Answers: a

21. Which clause is used to “Identifies table from which to draw table and how the table should be joined”?
a) FROM
b) SELECT
c) ORDER By
d) WHERE

Answer: a

22. Which clause is used to “filter out unwanted Groups”?
a) HAVING
b) FROM
c) WHERE
d) SELECT

Answer: a

23. “MODIFY” is used with which “Query clause”?
a) ALTER
b) FROM
c) WHERE
d) ORDER BY

Answer: a

24. What performs administrative operations?
a) mysqldump
b) mysqladmin
c) mysqlimport
d) mysqlexport

Answer: b

25. Which of these is used during MySQL setup?
a) mysqld_multi
b) mysql.server
c) mysqld_safe
d) comp_err

Answer: d