We have listed here some multiple choice questions with answer on MySQL database, Which has asked by multiple companies like Genpact, Syntel, Ericsson, Zensar, Virtusa etc.

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

1. Which mode is used to turn off the special meaning of backslash and treat it as an ordinary character?
a) NO_ESCAPES_SLASH
b) NO_ESCAPES_BACKSLASH
c) NO_BACKSLASH_ESCAPES
d) NO_BACKSLASH_ESCAPE

Answer: c

2. To measure the length of a string in bytes, the operator used is __________
a) CHAR_LENGTH()
b) LENGTH()
c) LEN()
d) SIZE()

Answer: b

3. Character data can be stored as
a) Fixed length string
b) Variable length string
c) Either Fixed or Variable length string
d) None of the mentioned

Answer: c

4. The maximum length of the char columns is
a) 255 bytes
b) 65, 535 bytes
c) 256 bytes
d) None of the mentioned

Answer: a

5. Which one is the correct declaration for choosing the character set other than default?
a) Varchar(20) character set utf8;
b) Varchar(20);
c) Varchar(20) character set;
d) None of the mentioned

Answer: a

6. Which data type is more suitable for storing “documents” in Mysql?
a) Varchar
b) Longtext
c) Mediumtext
d) Either Varchar or Longtext

Answer: b

7. What will be the storage pattern for “float(4,2)” in Mysql?
a) Total of four digits, two to the left of decimal and two to the right of decimal
b) Total of six digits
c) Total of four digits, not distributed uniformly
d) None of the mentioned

Answer: a

8. Which among the following is the correct representation of “float(1,1)”?
a) Total of 1 digit
b) Total of 2 digit
c) Total of 2 digit, one digit at right of the decimal, one digit at left of the decimal
d) None of the mentioned

Answer: a

9. The number of rows in the table is 10. Suppose all rows are deleted. The new row starts with sequence number _____________
a) 11
b) 1
c) 100
d) 101

Answer: b

10. If the PIPES_AS_CONCAT is disabled, ‘abc’ || ‘xyz’ results in ____________
a) 1
b) 0
c) error
d) -1

Answer: b

11. The expression ‘HI’ LIKE NULL results in _____________
a) True
b) False
c) NULL
d) 0

Answer: c

12. The number of strings among the following matched with ‘%all%’ is _____________
Ball, baller, tall, tallest
a) 1
b) 2
c) 3
d) 4

Answer: d

13. Which datatype is best suited to store currency values?
a) INT
b) FLOAT
c) DOUBLE
d) DECIMAL

Answer: d

14. If an integer column is used for the values in range 1 to 99999, the best suitable datatype is ____________
a) MEDIUMINT SIGNED
b) MEDIUMINT UNSIGNED
c) SMALLINT SIGNED
d) SMALLINT UNSIGNED

Answer: b

15. Which of these return a result to the client?
a) Stored functions
b) Stored procedures
c) Triggers
d) Events

Answer: a

16. Which character does the mysql client program recognize as a statement delimiter?
a) :
b) .
c) ;
d) ,

Answer: c

17. How many values can be returned from a given stored function?
a) 0
b) 1
c) 2
d) 3

Answer: b

18. Which variable is set to zero when automatic privilege granting is not needed?
a) automatic_sp_privileges
b) automatic_ps_privileges
c) automatic_pg_privileges
d) automatic_gp_privileges

Answer: a

19. For the same input parameters, if the stored function returns the same result, it is called _____________
a) deterministic
b) non deterministic
c) regular
d) monotonous

Answer: a

20. For which of the following are triggers not supported?
a) delete
b) update
c) insert
d) views

Answer: d

21. Which statement is used to check the status of the event scheduler at runtime?
a) SHOW STATUS OF ‘event_scheduler’
b) SHOW VARIABLES OF ‘event_scheduler’
c) SHOW STATUS LIKE ‘event_scheduler’
d) SHOW VARIABLES LIKE ‘event_scheduler’

Answer: d

22. Which clause specifies periodic execution at fixed intervals?
a) EVERY
b) ALL
c) AT
d) ALTERNATE

Answer: a

23. The creation of a stored program is similar to the definition of a _______________
a) Trigger
b) Event
c) View
d) Table

Answer: c

24. A stored procedure is invoked using the statement __________
a) INVOKE
b) SEE
c) CALL
d) RETURN

Answer: c

25. In a single table (with 10 columns) join query the number of values needed to examine per column is __________
a) 1
b) 10
c) 0
d) 2

Answer: b