Top 121 MySQL Interview Questions

Q1. What is MySQL


Q2. What are some of the advantages of using MySQL?


Q3. In which language MySQL has been written?


Q4. What are the different tables types/storage engines present in MySQL?


Q5. What are the technical features of MySQL?


Q6. What is the default port number of MySQL?


Q7. Disadvantages of MySQL?


Q8. What is the difference between TRUNCATE and DELETE in MySQL?


Q9. What is the difference between MySQL_connect and MySQL_pconnect?


Q10. Can you tell what are the different set operations available in MySQL?


Q11. What do you mean by databases?


Q12. What is the difference between MySQL and SQL?


Q13. Why MySQL is used?


Q14. How can you find out the version of the installed MySQL?


Q15. Can you tell the order of SQL SELECT statement?


Q16. What does a MySQL database contain?


Q17. What is the difference between the database and the table?


Q18. What are Heap tables?


Q19. Why do we use the MySQL database server?


Q20. What are the advantages of MySQL when compared with Oracle?


Q21. What is the function of myisamchk?


Q22. What are the advantages and disadvantages of using MySQL?


Q23. What is Database White Box Testing?


Q24. How can you interact with MySQL?


Q25. What are the different tables present in MySQL?


Q26. Differentiate between FLOAT and DOUBLE?


Q27. What are some of the common MySQL commands?


Q28. What is the difference between CHAR and VARCHAR?


Q29. What is the difference between primary key and candidate key?


Q30. What are the Numeric Data Types in MySQL?


Q31. What are the Temporal Data Types in MySQL?


Q32. What are the String Data Types in MySQL?


Q33. What are MySQL Database Queries?


Q34. How to add columns in MySQL?


Q35. Differentiate CHAR_LENGTH and LENGTH?


Q36. What are the purposes of using ENUM and SET data types?


Q37. How to represent ENUMs and SETs internally?


Q38. What is Database Black Box Testing?


Q39. How do you create a database in MySQL?


Q40. How do you create a table using MySQL?


Q41. How to delete a table in MySQL?


Q42. How to add foreign keys in MySQL?


Q43. What is foreign keys in MySQL?


Q44. How do you Insert Data Into MySQL?


Q45. What is the usage of ENUMs in MySQL?


Q46. Define REGEXP?


Q47. What are the differences between a primary key and a foreign key?


Q48. What is CTE?


Q49. How do you remove a column from a database?


Q50. What is an Index in MySQL?


Q51. How to create an Index in MySQL?


Q52. How to Delete Data From a MySQL Table?


Q53. How to change the MySQL password?


Q54. Give string types available for column?


Q55. What is the purpose of using the TIMESTAMP data type?


Q56. What is a Cursor?


Q57. How can you test for NULL values in a database?


Q58. What is BLOB in MySQL?


Q59. How to change the table name in MySQL?


Q60. What storage engines Technique are used in MySQL?


Q61. What are the drivers in MySQL?


Q62. What is the difference between mysql_fetch_array() and ysql_fetch_object() ?


Q63. What is the difference between the NVL function, IFNULL function, and the ISNULL function?


Q64. What does a TIMESTAMP do on UPDATE CURRENT_TIMESTAMP data type?


Q65. How do you login to MySql using Unix shell?


Q66. Why should we use Lamp(Linux, Apache, MySQL, PHP) instead of any other software?


Q67. How can you filter the duplicate data while retrieving records from the table?


Q68. How do you control the max size of a HEAP table?


Q69. What are MySQL Views?


Q70. How do you create views in MySQL?


Q71. What are MySQL Triggers?


Q72. How many Triggers are possible in MySQL?


Q73. How do you create a trigger in MySQL?


Q74. How can I find the number of days between the two given dates?


Q75. What is the difference between NOW() and CURRENT_DATE()?


Q76. How to change the database name in MySQL?


Q77. What is the MySQL server?


Q78. How to import a database in MySQL?


Q79. How to change the column name in MySQL?


Q80. How to delete columns in MySQL?


Q81. What are the types of relationships used in MySQL?


Q82. What is Scaling in MySQL?


Q83. Which MySQL function is used to concatenate string?


Q84. What are the functions used to encrypt and decrypt the data present in MySQL?


Q85. What is the difference between a Heap table and Temporary table?


Q86. What is meant by a decimal (5,2)?


Q87. How to join two tables in MySQL?


Q88. How to join three tables in MySQL? Please write query for the same?


Q89. How to create a Stored Procedure in MySQL?


Q90. How to execute a stored procedure in MySQL?


Q91. What is Sharding in SQL?


Q92. How to clear screen in MySQL?


Q93. How to check USERS in MySQL?


Q94. How does indexing works in MySQL?


Q95. What are federated tables?


Q96. What is the function of mysqldump?


Q97. Who owns MySQL?


Q98. What is the difference between UNIX TIMESTAMP and MySQL TIMESTAMP?


Q99. How to set auto increment in MySQL?


Q100. What happens when the column is set to AUTO INCREMENT and you reach maximum data in the table?


Q101. How can you import tables from a SQL file into a database?


Q102. What does "i_am_a_dummy flag" do in MySQL?


Q103. How to get the current date in MySQL?


Q104. How can you see all indexes defined for a table?


Q105. What do you mean by % and _ in the LIKE statement?


Q106. How can you export the table as an XML file in MySQL?


Q107. What is a CSV table?


Q108. What are the column comparisons operators?


Q109. What is the difference between the LIKE and REGEXP operators?


Q110. What are the security alerts while using MySQL?


Q111. How to calculate the sum of any column of a table?


Q112. How can you count the total number of records of any table?


Q113. What is ISAM?


Q114. What are the nonstandard string types?


Q115. What is SQLyog?


Q116. What is a transaction?


Q117. What are the advantages of MyISAM over InnoDB?


Q118. What are the functions of commit and rollback statements?


Q119. What is the use of mysql_close()?


Q120. What is the difference between MyISAM Static and MyISAM Dynamic?


Q121. What is MySQL data directory?