Mysql Interview Question and Answers

6. What are HEAP tables in MySQL?
  • HEAP tables are in-memory. They are usually used for high-speed temporary storage.
  • No TEXT or BLOB fields are allowed within HEAP tables.
  • You can only use the comparison operators = and ‹=›.
  • HEAP tables do not support AUTO_INCREMENT.
  • Indexes must be NOT NULL.
7. How do you return the a hundred books starting from 25th?
  SELECT book_title FROM books LIMIT 25, 100;
8. How would you write a query to select all teams that won either 2, 4, 6 or 8 games?
  SELECT team_name FROM teams WHERE team_won IN (2, 4, 6, 8).
9. What is the default port for MySQL Server?
  The default port is 3306.
10. How would you select all the users, whose phone number is null?
  SELECT user_name FROM users WHERE ISNULL(user_phonenumber);
12345678910 Page 2 of 10