Home » Database » MySQL » Top MySql Interview Questions And Answers Part 2

Top MySql Interview Questions And Answers Part 2

MySQL/Mariadb

1. How to represent ENUMs and SETs internally?

ENUMs and SETs are used to represent powers of two because of storage optimizations. i.e Create table size(name ENUM(‘Small’, ‘Medium’,’Large’);

2. Give string types available for column?

The string types are:

  1. SET
  2. BLOB
  3. ENUM
  4. CHAR
  5. TEXT
  6. VARCHAR

3. What are the drivers in MySQL?

Following are the drivers available in MySQL:

  1. PHP Driver
  2. ODBC Driver
  3. JDBC Driver
  4. C WRAPPER
  5. PYTHON Driver
  6. PERL Driver
  7. RUBY Driver..So on

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

TIMESTAMP column is updated with Zero when the table is created. UPDATE CURRENT_TIMESTAMP modifier updates the timestamp field to current time whenever there is a change in other fields of the table.

5. What does myisamchk do?

It compress the MyISAM tables, which reduces their disk or memory usage.

Leave a Reply

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