MySQL Interview Questions & Answers

MySQL Interview Online Test
1. What's MySQL ?
Show Answer
2. What is DDL, DML and DCL ?
Show Answer
3. How do you get the number of rows affected by query?
Show Answer
4. If the value in the column is repeatable, how do you find out the unique values?
Show Answer
5. How do you return the a hundred books starting from 25th?
Show Answer
6. You wrote a search engine that should retrieve 10 results at a time, but at the same time youd like to know how many rows therere total. How do you display that to the user?
Show Answer
7. How would you write a query to select all teams that won either 2, 4, 6 or 8 games?
Show Answer
8. How would you select all the users, whose phone number is null?
Show Answer
9. What does this query mean: SELECT user_name, user_isp FROM users LEFT JOIN isps USING (user_id) ?
Show Answer
10. How do you find out which auto increment was assigned on the last insert?
Show Answer
11. What does i-am-a-dummy flag to do when starting MySQL?
Show Answer
12. On executing the DELETE statement I keep getting the error about foreign key constraint failing. What do I do?
Show Answer
13. When would you use ORDER BY in DELETE statement?
Show Answer
14. How can you see all indexes defined for a table?
Show Answer
15. How would you change a column from VARCHAR(10) to VARCHAR(50)?
Show Answer
16. How would you delete a column?
Show Answer
17. How would you change a table to InnoDB?
Show Answer
18. When you create a table, and then run SHOW CREATE TABLE on it, you occasionally get different results than what you typed in. What does MySQL modify in your newly created tables?
Show Answer
19. How do I find out all databases starting with ‘tech to which I have access to?
Show Answer
20. How do you concatenate strings in MySQL?
Show Answer
21. How do you get a portion of a string?
Show Answer
22. whats the difference between CHAR_LENGTH and LENGTH?
Show Answer
23. How do you convert a string to UTF-8?
Show Answer
24. What do % and _ mean inside LIKE statement?
Show Answer
25. What does + mean in REGEXP?
Show Answer
26. How do you get the month from a timestamp?
Show Answer
27. How do you offload the time/date handling to MySQL?
Show Answer
28. How do you add three minutes to a date?
Show Answer
29. whats the difference between Unix timestamps and MySQL timestamps?
Show Answer
30. How do you convert between Unix timestamps and MySQL timestamps?
Show Answer
31. What are ENUMs used for in MySQL?
Show Answer
32. How are ENUMs and SETs represented internally?
Show Answer
33. How do you start and stop MySQL on Windows?
Show Answer
34. How do you start MySQL on Linux?
Show Answer
35. Explain the difference between mysql and mysql interfaces in PHP?
Show Answer
36. whats the default port for MySQL Server?
Show Answer
37. What does tee command do in MySQL?
Show Answer
38. Can you save your connection settings to a conf file?
Show Answer
39. How do you change a password for an existing user via mysqladmin?
Show Answer
40. Use mysqldump to create a copy of the database?
Show Answer
41. Have you ever used MySQL Administrator and MySQL Query Browser?
Show Answer
42. What are some good ideas regarding user security in MySQL?
Show Answer
43. Explain the difference between MyISAM Static and MyISAM Dynamic. ?
Show Answer
44. What does myisamchk do?
Show Answer
45. Explain advantages of InnoDB over MyISAM?
Show Answer
46. Explain the differences between INNER JOIN and LEFT JOIN
Show Answer
47. What are stored procedures and what are their advantages
Show Answer
48. Describe how indexing works in MySQL
Show Answer
49. What is a foreign key and how is it used
Show Answer
50. How do you optimize a slow-performing query
Show Answer
51. What is the difference between UNION and UNION ALL
Show Answer
52. Explain the concept of ACID properties in databases
Show Answer
53. What are indexes and how many types of indexes are there in MySQL
Show Answer
54. How do you handle deadlocks in MySQL
Show Answer
55. What are triggers and how are they used in MySQL
Show Answer
56. What is normalization and what are its advantages
Show Answer
57. Explain the difference between a primary key and a unique key
Show Answer
58. Describe the use of transactions in MySQL
Show Answer
59. What are views and why are they useful
Show Answer
60. How can you improve MySQL performance
Show Answer
61. What are subqueries and how are they different from joins
Show Answer
62. What is denormalization and when would you use it
Show Answer
63. Explain the difference between MyISAM and InnoDB storage engines
Show Answer
64. What are the different types of joins in SQL
Show Answer
65. How does MySQL handle memory management
Show Answer
66. What is the purpose of the EXPLAIN statement in MySQL
Show Answer
67. How do you back up and restore a MySQL database
Show Answer
68. What is partitioning in MySQL and its benefits
Show Answer
69. How do you perform full-text search in MySQL
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test