Thursday, August 6, 2015

MySQL Interview Questions

MySQL Interview Questions,MySQL Interview Questions and Answers 2015,Top 14 MySQL Interview Questions,MySQL Interview Questions & Answers,MySQL Interview Questions and Answers For Freshers and Experienced. MySQL Frequently Asked Interview Questions,Freshers Latest MySQL Technical Interview Questions & Answers,F2F Interview,MySQL, Interview Questions & Answers,What would be some common MySQL interview questions,MySQL interview questions and answers for 2 years,MySQL Developer Interview Questions,10 Common face to face MySQL interview questions and answers,MySQL Interview Questions and Answers,Top 10 MySQL Interview Questions and Answers 2015,MySQL (CMS)Interview Question Answer,Technical MySQL Interview Questions and Answers for getting Job,Where can I find good MySQL interview questions,MySQL job interview questions and answers for freshers,MySQL interview questions and answers for experienced,10 Tough MySQL Interview Questions With Smart Answers,MySQL interview questions and answers for experienced,How to Answer MySQL Interview Questions,Where can I find good MySQL interview questions ,Download MySQL Interview

1. 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

2. 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.

3. 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

4. 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.

5. 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

6. 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.

7. 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

8. What is TEXT?

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

- TINYTEXT
- TEXT
- MEDIUMTEXT
- LONGTEXT

8. 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.

9. 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

10. Explain advantages of MyISAM over InnoDB?

- MyISAM follows a much more conservative approach to disk space management – storing each MyISAM table in a separate file, which can be further compresses, if required.
- InnoDB stores the tables in tablespace. Further optimization is difficult with them.

11. How would concatenate strings in MySQL?

With the use of - CONCAT (string1, string2, string3)

12. How would you get the current date in Mysql?

By using SELECT CURRENT_DATE();

13. How would you enter Characters as HEX Numbers?

- To enter characters as HEX numbers, you can enter HEX numbers with single quotes and a prefix of (X)
- Alternatively, just prefix HEX numbers with (Ox).

14. How are MySQL timestamps seen to a user?

- MySQL time stamps are seen to a user in a readable format : YYYY-MM-DD HH:MM:SS. 

0 comments:

Post a Comment