MySql Interview Questions and Answers - MySql Online Test

How many TRIGGERS are allowed in MySql table?

MySql table allows following 6 triggers:

- BEFORE INSERT
- AFTER INSERT
- BEFORE UPDATE
- AFTER UPDATE
- BEFORE DELETE and
- AFTER DELETE

Differentiate between FLOAT and DOUBLE.

FLOAT stores floating point numbers with accuracy up to eight places and has four bytes while DOUBLE stores floating point numbers with accuracy upto 18 places and has eight bytes.

Tell us something about Heap tables.

- HEAP tables are found in memory.
- They are used for high speed storage on temporary basis.

Some of their characteristics are:
- They do not allow BLOB or TEXT fields.
- Only comparison operators like =, <, >, = >, =< can be used with them.
- AUTO_INCREMENT is not supported by HEAP tables
- Indexes should be NOT NULL

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

- Maximum size of Heap table can be controlled using MySQL config variable called max_heap_table_size.

What are the advantages of MySQL in comparison to Oracle?

- MySQL is open source software available at zero cost.
- It is portable.
- GUI with command prompt.
- Administration is supported by MySQL Query Browser.

What does myisamchk do?

- It compresses the MyISAM tables, which reduces their disk or memory usage

How can we convert between Unix & MySQL timestamps?

- MySQL timestamp can be converted into Unix timestamp using the command UNIX_TIMESTAMP.
- Unix timestamp can be converted into MySQL timestamp using the command FROM_UNIXTIME.

What is BLOB?

- BLOB stands for binary large object.
- It that can hold a variable amount of data.

There are four types of BLOB based on the maximum length of values they can hold:

- TINYBLOB
- BLOB
- MEDIUMBLOB
- LONGBLOB

What is TEXT?

TEXT is case-insensitive BLOB. The four types of TEXT are:

- TINYTEXT
- TEXT
- MEDIUMTEXT
- LONGTEXT

What is the difference between BLOB and TEXT?

- In BLOB sorting and comparison is performed in case-sensitive for BLOB values.
- In TEXT types sorting and comparison is performed case-insensitive.

How is MyISAM table stored?

MyISAM table is stored on disk in three formats.
- ‘.frm’ file – storing the table definition
- ‘.MYD’ (MYData) - data file
- ‘.MYI’ (MYIndex) – index file
1 2 3 4 5 6

MySQL - Explain how can you start and shutdown MySQL server
Explain how can you start and shutdown MySQL server - Set the mysql directory and type: ./bin/mysqld_safe &......
MySQL - Tools that are available for managing MySQL Server
Tools that are available for managing MySQL Server - mysqld - MySQL server daemon. It is used to start the mysql server.....
MySQL - Purpose of "mysql" command-line interface
Purpose of mysql command-line interface - Mysql or mysql monitor is a Command line interface used to manage mysql’s data objects like databases, tables etc..
Post your comment
Discussion Board
Contents for interview Questions
Being a IT Recruiter i need to work on different Technology and make sure that i am talking to right candidate for specific requirement given to me. I have gone through contents for interview Questions for MYSQL and i must say that this is excellent site to ask questions for initial screening of candidates.

Excellent site with fully loaded information.

Nitin Gujarati
Nitin Gujarati 08-12-2015
database
would like to know more about usage of join and its types. (with syntax)
how would you perform normalization on tables with example table.
CSE 06-26-2014
question
how many type of tables in sqldb ? please describe them .
Durga prasad 04-6-2012
MySQL interview questions and answers
How can you see all indexes defined for a table?
SHOW INDEX FROM table_name;

How do you concatenate strings in MySQL?
CONCAT (string1, string2, string3)
Raveesh 12-6-2011
MySQL interview questions and answers
What is the default port for MySQL Server?
- 3306

What is the function of myisamchk?
- It compresses the MyISAM tables. This reduces their disk usage.

Explain CSV tables.
They special tables for which the data is saved into comma-separated values files. They cannot be indexed.
Paresh 12-6-2011
MySQL interview questions and answers
I want to find out all databases starting with ‘test’, I have access to?
- SHOW DATABASES LIKE ‘test%’;

Explain % and _ inside LIKE statement?
- % corresponds to 0 or more characters
- _ is exactly one character.

I want to start and stop MySQL on Windows? How do I do that?
- net start MySQL, net stop MySQL
Venkat 12-6-2011