Please Select a Company.
Please Select a Company.
Mysql MCQ Questions | Interview Quick

.

MySQL MCQ

1. When you have a subquery inside of the main query, which query is executed first?

2. You need to export the entire database, including the database objects, in addition to the data. Which command-line tool do you use?

3. You must ensure the accuracy and reliability of the data in your database. You assign some constraints to limit the type of data that can go into a table. What type of constraints are you assigning?

4. Which option of most MySQL command-line programs can be used to get a description of the program's different options?

5. MySQL uses environment variables in some of the programs and command-line operations. Which variable is used by the shell to find MySQL programs?

6. If you were building a table schema to store student grades as a letter (A, B, C, D, or F) which column type would be the best choice?

7. Management has requested that you build an employee database. You start with the employee table. What is the correct syntax?

8. . Which query would NOT be used to administer a MySQL server?

9. . MySQL server can operate in different SQL modes, depending on the value of the sql_mode system variable. Which mode changes syntax and behavior to conform more closely to standard SQL?

10. . MySQL programs are a set of command-line utilities that are provided with typical MySQL distributions. MySQL is designed to be a database.

11. Which MySQL command shows the structure of a table?

12. MySQL uses security based on _ for all connections, queries, and other operations that users can attempt to perform.

13. Which MySQL command modifies data records in a table?

14. What is the best type of query for validating the format of an email address in a MySQL table?

15. In MySQL, queries are always followed by what character?

16. How can you remove a record using MySQL?

17. Which choice is NOT a statement you would use to filter data?

18. In SELECT * FROM clients; what does clients represent?

19. How does MySQL differ from SQL?

20. If you need to order a table of movies by name, which query will work?

21. A trigger is a database object that is associated with a table, and that activates when a particular event occurs for the table. Which three events are these?

22. You are working with very large tables in your database. Which SQL clause do you use to prevent exceedingly large query results?

23. What is the default port for MySQL Server?

24. How can you filter duplicate data while retrieving records from a table?

25. What is the difference between DROP and TRUNCATE?

26. How do you select every row in a given table named "inventory"?

27. In an efficiently designed relational database, what does every table have?

28. MySQL option files provide a way to specify commonly used options so that they need not be entered on the command line each time you run a program. What is another name for the option files?

29. After installing MySQL, it may be necessary to initialize the _ which may be done automatically with some MySQL installation methods.

30. You need to export the data in the customers table into a CSV file, with columns headers in the first row. Which clause do you add to your MySQL command?

31. One form of backup, replication, enables you to maintain identical data on multiple servers, as a _ configuration.

32. What is the requirement for using a subquery in the SELECT clause?

33. Each time MySQL is upgraded, it is best to execute mysql_upgrade, which looks for incompatibilities with the upgraded MySQL server. What does this command do, upon finding a table with a possible incompatibility?

34. What mysql statement is used to check which accounts have specific privileges?

35. What cannot have a trigger associated with it?

36. Later versions of mysql support the native json data type for storing json documents. What is a drawback of json columns?

37. Which statement can you use to load data from a file into the table?

38. Which is the correct syntax of an extended insert statement?

39. You need to make an exact copy of a table, with all columns and indexes. How can you get all of the information needed to accomplish this?

40. You need to make your mysql system secure against attackers. What are you not supposed to do?

41. You manage a database with a table "customers". You created a temporary table also called "customers" with which you are working for the duration of your session. You need to recreate the temporary table with different specs. Which command do you need to run first?

42. You need to run a complex query with recursive subqueries, but without creating a stored procedure or a function. Which command or clause do you use?

43. Which choice is not a processing algorithm for database views?

44. What is the MySQL perror command-line utility used for?

45. How can you list all columns for a given table?

46. How would you list the full set of tables in the currently selected database?

47. Which choice is not one of the table maintenance statements?

48. In which table does MySQL store passwords for user accounts?

49. Management has requested that you build an employee database. You need to include each employee's current position and salary, as well as all prior positions and salaries with the company. You decide to use a one-to-many structure: an employee table with the main information such as name and address, and an employment table with position and salary history. You can use the employeeID field to connect them. What is employment.employeeID an example of?

50. In recent versions of MySQL (8.0+), what's the correct syntax to declare a CTE (Common Table Expression)?

51. What is one reason to introduce data redundancy into a normalized database design?

52. You are loading data into a table. Which command can you use to make sure that all data is inserted and duplicates rows are discarded?

53. Which statement about the TRUNCATE TABLE statement is true?

54. In data migration, there is often a need to delete duplicate rows as part of data cleanup. Which statement works best?

55. When working with MySQL cursor, what must you also declare?

56. Which type of backup includes all the changes made to the data since the last full backup was performed?

57. You need to restore a MySQL database from a backup file. Which command-line tool do you use for the actual data import, after re-creating the database?

58. You are importing data as JSON into a new table. You run CREATE TABLE json_data ( city JSON ); and insert rows into this table. What is the correct syntax to see the list of cities?

59. If you want to use MyISAM instead of InnoDB, which option do you need to specify in the CREATE TABLE statement?

60. Which query lists the databases on the current server?

61. What is the product of the database designing phase?

62. Which choice is not a valid model for a stored procedure parameter?

63. What is the advantage of using a temporary table instead of a heap table?

64. Which is a valid constructor for a class named User?

65. What is the maximum number of columns that can be used by a single table index?

66. Which command will return a list of triggers in the current database?

67. Which statement is true about TIMESTAMP and DATETIME data types?

68. What is the equivalent of the mysqladmin reload command?

69. Explain the security aspect of stored procedures

70. How would you retrieve data on all the customers where no phone number is stored?

71. Which choice is not an available string type for a column?

72. A stored routine is a set of SQL statements stored on the server and takes form as either a procedure or a function. Which statement cannot be used inside stored routines?

74. Why would you use a common table expression (CTE)?

75. Which option modifier tells a program not to exit with an error if it does not recognize the option, but instead to issue a warning?

76. The left and right joins are also known as _.

77. What is the valid way to create a database view in MySQL?

78. How are permissions implemented in MySQL?

79. Inside a transaction, several operations need to be performed. What would you do if an exception happens during that transaction?

80. What function finds the current time or date in MySQL?

81. What is the correct usage of ENUM in MySQL?

82. The mysqldump command cannot generate output in _.

83. Why would you use stored functions?

84. What is valid way to create a database view in MySQL?

85. Which choice is an example of an aggregate function?Which choice is an example of an aggregate function?

86. You are working with the tables as shown in this diagram. You need to generate the list of customers who purchased certain car models. Which SQL clause do you use?

87. You are managing a database with a table called "customers". You created a temporary table also called "customers" with which you are working for the duration of your session. You need to re-create the temporary table with different specifications. Which command do you need to run first?

88. How would you make a case-insensitive query in MySQL?

89. "COUNT" keyword belongs to which categories in Mysql?

90. Which among the following belongs to an "aggregate function"?

91. What is the meaning of "HAVING" clause in Mysql?

92. Which clause is similar to "HAVING" clause in Mysql?

93. Later versions of MySQL support the native JSON data type for storing JSON documents. What is a drawback of JSON columns?

94. With MySQL, how do you select all the records from a table named "Persons" where the "LastName" is alphabetically between (and including) "Hansen" and "Pettersen"?

Our Brands by Nishtya Infotech Private Limited:

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as