Mysql MCQ questions | PHP mysql multiple choice questions and answer

Mysql MCQ questions | PHP MySQL multiple choice questions and answers for the preparation of academic and competitive IT Exams.

Welcome to our collection of Multiple-Choice Questions (MCQs) on MySQL! In this article, we have compiled a set of MCQs specifically focused on MySQL, a popular relational database management system widely used in web development and other applications.

These questions will help you test your knowledge and understanding of MySQL and its integration with PHP, a widely-used programming language for web development.

Mysql MCQ questions  PHP mysql multiple choice questions and answer

Mysql MCQ questions

1. ___ is the most popular Open Source SQL database management system.
A) MySQL
B) Access
C) MS SQL
D) Oracle

2. Replication capabilities in MySQL based on the propagation of SQL statements from master to slave is called ___
A) Query-based
B) statement-based
C) Function-based
D) Column based

3. A ___ full-text plugin performs the actual parsing and extraction of the text and hands it over to the built-in MySQL full-text search.
A) plugin
B) post parser
C) pre-parser
D) None of the above

4. All MySQL collations are of type ___.
A) PLUGIN
B) PARSER
C) PADSPACE
D) None of the above

5. Under ___ mode MySQL verifies only that the month is in the range from 0 to 12 and that the day is in the range from 0 to 31.
A) ALLOW_INVALID_DATES SQL
B) ALLOW
C) INVALID_DATES SQL
D) ALLOW_INVALID

6. An ___ is a string object with a value chosen from a list of allowed values.
A) VARCHAR
B) INT
C) CHAR
D) ENUM

7. ___ enables you to change the overall characteristics of a database.
A) None of these
B) UPDATE
C) DROP
D) ALTER DATABASE

8. Database characteristics are stored in the ___ file in the database directory.
A) db.opt
B) Default
C) Database
D) None of the these

9. ___ are used to find rows with specific column values quickly.
A) Function
B) Query
C) Prefixes
D) Indexes

10. By using the ___ clause user can use INSERT…VALUES of syntax similar to that used by the
UPDATE statement.
A) WHERE
B) SET
C) JOIN
D) None of these

11. The ___ statements are used to manipulate the data.
A) Function
B) Query
C) Data Definition Language
D) Data Manipulation Language

12. ___ command is used to enter data into created table.
A) SELECT
B) LOAD
C) INSERT
D) UPDATE

13. mysql> SELECT * FROM users LEFT JOIN users_groups ON users.uid = users_groups.uid; Given syntax is the example for ___ JOIN.
A) Left Outer Join
B) Right Outer Join
C) Inner join
D) None of these

14. ___ is used to combine the result from multiple SELECT statements into a single result set.
A) UNION
B) CROSS
C) INNER
D) None of the these

15. The count of rows affected by TRUNCATE TABLE is accurate only when it is __ to a DELETE statement
A) Selected
B) Loaded
C) Mapped
D) Updated

16. When an outer reference appears within a subquery, MySQL has to run the subquery once for every ___.
A) Subquery
B) Where clause
C) Record generated
D) None of these

17. Tables containing NULL values and empty tables are___.
A) Selected
B) Where clause
C) Edge cases
D) None of these

18. A scalar subquery is a simple ___.
A) Operand
B) Operator
C) Insert
D) None of these

19. The ___ operator is used to test whether or not a value lies within a specified range.
A) LIKE
B) BETWEEN
C) IN
D) None of these

20. String-valued functions return NULL if the length of the result would be greater than the value of the ___ system variable
A) max_allowed_packet
B) min_allowed_packet
C) NULL
D) None of these

21. The operators are used to build ___ expressions.
A) Query
B) Simple
C) Complex
D) None of these

22. Full-text searches are supported for ___ tables only.
A) String
B) MyISAM
C) Integer
D) None of these

23. MySQL can perform boolean full-text searches using the ___ modifier.
A) OFF BOOLEAN MODE
B) IN BOOLEAN MODE
C) IN
D) None of these

24. Blind query expansion is also known as ___.
A) Manual relevance feedback
B) feedback
C) Automatic relevance feedback
D) None of these

25. MySQL runs with ___ mode enabled by default.
A) Autocommit
B) Commit
C) Rollback
D) None of these

26. The ___ statement sets a named transaction savepoint with a name of identifier.
A) SAVEPOINT
B) ROLLBACK
C) COMMIT
D) None of these

27. ___ statements cannot be rolled back.
A) None of these
B) Data Control Language
C) Data Manipulation Language
D) Data Definition Language

28. The use of the ___ character should be avoided because that is the escape character for MySQL.
A) Backslash (“\”)
B) Frontslash
C) Semicolon
D) None of these

29. ___ FUNCTION is used to drop user-defined functions.
A) ALTER
B) UPDATE
C) DROP
D) None of these

30. MySQL follows the ___ syntax for stored routines.
A) SQL: 2000
B) SQL:2003
C) SQL: 2005
D) None of these

31. The ___ statement may only be used inside a BEGIN … END compound statement and must be at its start, before any other statements.
A) DECLARE
B) BEGIN
C) END
D) None of these

32. For a ___ handler, execution of the current routine continues after execution of the handler statement.
A) CONTINUE
B) EXIT
C) WHILE
D) None of these

33. ___ implements a complex conditional construct.
A) CASE
B) IF
C) LOOP
D) None of these

34. The ___ statement removes one or more MySQL accounts.
A) DROP USER
B) DELETE USER
C) GRANT USER
D) None of these

35. MySQL ___ passwords using its own algorithm.
A) Decrypts
B) Encrypts
C) Deletes
D) None of these

36. MySQL uses security based on ___ for all connections, queries, and other operations that users can attempt to perform.
A) Access Control Lists (ACLs)
B) Database
C) Operating system
D) None of these

37. ____ command is used to check whether or not MySQL port is open.
A) shell> telnet server_host 1234
B) shell> telnet server_host 33
C) shell> telnet server_host 3306
D) None of these

38. By default, all log files are created in the ___data directory.
A) mysqld
B) system
C) log
D) None of these

39. The ___ can be used to determine where mysqld died.
A) queue trace
B) heap trace
C) stack trace
D) None of these

40. The ___ log contains all statements that update data.
A) General
B) None of these
C) Error
D) Binary

41. The numbers of indexes allowed per table in MySQL are ___.
A) 32
B) 64
C) 16
D) 4

42. The ___command can be used to show the metadata regarding the table created.
A) SHOW
B) EXPLAIN
C) FIND
D) DESC

43. A ___ is a binary large object that can hold a variable amount of data.
A) CHAR
B) INT
C) TEXT
D) BLOB

44. TEXT values are sorted and compared based on the ___ of the character set.
A) Collation
B) Sorting
C) Comparison
D) Function

45. CREATE TABLE does not automatically ___ the currently active transaction if the user uses the TEMPORARY keyword.
A) BLOB
B) Drop
C) Commit
D) Prefix

46. For all engines, a ___ index allows multiple NULL values for columns that can contain NULL.
A) PRIMARY
B) COLUMN
C) UNIQUE
D) ROW

47. A ___ table is visible only to the current connection and is dropped automatically when the connection is closed.
A) Temporary
B) Permanent
C) Default
D) None of these

48. The ___ clause has been used to connect the similar fields within both tables to each other and present a composite picture.
A) ON
B) UPDATE
C) WHERE
D) None of these

49. INNER JOIN is also known as ___.
A) Equi Joins
B) Default joins
C) Cross joins
D) None of these

50. Give an example for third- party programs that offer capabilities for MySQL account administration.
A) phpMyAdmin
B) DB2
C) Windows
D) None of these

51. Rock-solid ___and constant ___are hallmarks of MySQL
a) Query
b) Demand
c) Reliability
d) Availability
A) c, d
B) a, b
C) b, c
D) b, d

52. If the user tries to insert an illegal date MySQL gives ___ or ___.
a) Warnings
b) Message
c) Errors
d) None of these
A) a, c
B) d
C) b, a
D) c, b

53. Using COLUMN_FORMAT with MySQL Cluster ___ and MySQL Cluster___ , it is possible to specify a data storage format for individual columns of NDB tables.
a) NDB 6.3.1
b) NDB 6.2.5
c) NDB 6.3.2
d) None of these
A) a, b
B) b, c
C) a, c
D) a, d

54. SELECT can be used to retrieve rows computed without ___ to any table and as an expression ___.
a) Insert
b) Reference
c) FOREGIN
d) Evaluator
A) b, d
B) a, d
C) a, c
D) b, c

55. User must have both the ___ and ___ privileges for the table to use REPLACE.
a) INSERT
b) UPDATE
c) DELETE
d) REPLACE
A) a, c
B) d
C) b, a
D) c, b

56. MySQL enables the user to include subqueries in either a ___ clause or a ___ clause.
a) None of these
b) INSERT
c) WHERE
d) HAVING
A) c, d
B) a, b
C) b, c
D) d, b

57. Clauses allow the user to perform sophisticated ___ and ___ operations on the data in your MySQL tables.
a) Comparison
b) Select
c) Conversion
d) None of these
A) a, c
B) d
C) b, a
D) c, b

58. ___ and ___ are the Wildcard Characters.
a) %
b) _
c) ||
d) $
A) c, d
B) a, b
C) a, c
D) b, c

59. The minimum and maximum lengths of words to be indexed are defined by the __ and __ system variables.
a) max
b) min
c) ft_min_word_len
d) ft_max_word_len
A) b, c
B) a, b
C) a, c
D) c, d

60. ___ and ___ can be considered the most cryptographically secure encryption functions currently available in MySQL.
a) AES_ENCRYPT()
b) ENCRYPT()
c) AES_DECRYPT()
d) DECRYPT()
A) a, b
B) b, c
C) a, c
D) d, c

61. Mention the main reasons to use LOCK TABLES.
a) Slow the process
b) Emulating transactions
c) Get more speed
d) None of these
A) b, c
B) a, b
C) a, d
D) a, c

62. ___ and ___ can be used instead of START TRANSACTION to initiate a transaction.
a) BEGIN
b) CREATE
c) BEGIN WORK
d) None of these
A) b, c
B) a, b
C) a, c
D) d, c

63. ___ and ___ statements cause the output to display the metadata regarding the procedures and functions created.
a) Show Procedure Status
b) Show
c) Show Function Status
d) None of these
A) B, C
B) a, b
C) a, c
D) d, c

64. To call a stored procedure, the user needs to know the ___ and know about any ___ that will be passed to the procedure.
a) Query
b) Procedure name
c) Statements
d) Parameters
A) a, b
B) b, d
C) a, c
D) d, c

65. The CASE statement can not have an ___ clause, and the construct is terminated with ___ instead of END.
a) ELSE NULL
b) START CASE
c) END CASE
d) None of these
A) b, c
B) a, b
C) a, c
D) d, c

66. FETCH cursor_name fetches the next row using the specified___, and ___ the cursor pointer.
a) Query
b) Open cursor
c) Close cursor
d) Advances
A) a, b
B) b, d
C) a, c
D) d, c

67. How to set up passwords for the anonymous accounts for the initial MySQL accounts.
a) Using SELECT to modify
b) Connect to the server as root and then use either SET PASSWORD or UPDATE.
c) Using UPDATE to modify
d) None of these
A) c, d
B) b, c
C) a, c
D) a, b

68. To avoid the password value on the command line, specify the ___ or ___ without any following password.
a) –password
b) –User
c) -p option
d) None of these
A) B, C
B) A, B
C) A, C
D) D, C

69. In a numeric context, MySQL automatically converts this string to a ___ and ___ any trailing non-numeric characters from it.
a) Statement
b) Number
c) Function
d) Strips
A) a, b
B) b, d
C) a, c
D) d, c

70. When the general query log is enabled, the output is written to any destinations specified by the_ or _ variable.
a) log_binary
b) –log-output option
c) log_error
d) log_output system
A) a, b
B) b, d
C) a, c
D) d, c

The USA 50 States Geography quiz question and answers

71. The CHAR and VARCHAR types are similar but differ in the way they are___ and ___.
a) Stored
b) Retrieved
c) Searching
d) Default forms
A) a, c
B) a, b
C) d, c
D) b, c

72. Prefix lengths are given in ___ for non-binary string types and in ___ for binary string types
a) Float
b) Characters
c) Bytes
d) Integer
A) a, d
B) b, a
C) b, c
D) c, d

73. User can refer to the column as _rowid in SELECT statements if a ___ or ___ index consists of only one column that has an integer type.
a) CANDIDATE
b) PRIMARY KEY
c) FOREGIN
d) UNIQUE
A) b, d
B) a, d
C) a, c
D) b, c

74. The REPLACE statement returns a count that is the sum of the rows ___ and ___.
a) Deleted
b) Inserted
c) Select
d) Default
A) a, c
B) a, b
C) d, c
D) b, c

75. To use DROP USER, the user must have the global ___ privilege or the ___ privilege for the MySQL database.
a) CREATE USER
b) DELETE
c) UPDATE
d) None of these
A) b, c
B) a, b
C) a, d
D) a, c

RDBMS multiple choice questions with answers pdf

Thanks for visiting our website, if you like the post on Mysql MCQ questions please share on social media.

Share on Social Media

Leave a Comment

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

Scroll to Top