Top MySql Interview Questions And Answers Part 3
1. What is the difference between BLOB and TEXT?
BLOBs are binary large object holding huge data. 4 types of BLOB are-
TEXT is case-sensitive BLOB. 4 types of TEXT are-
- TINY TEXT
- LONG TEXT.
2. What are the TRIGGERS that can be used in MySQL tables?
The following TRIGGERS are allowed in MySQL:
- BEFORE INSERT
- AFTER INSERT
- BEFORE UPDATE
- AFTER UPDATE
- BEFORE DELETE
- AFTER DELETE
3. What is the difference between LIKE and REGEXP operators in MySQL?
LIKE is denoted using the % sign. i.e SELECT * FROM user WHERE user name LIKE “%NAME”.
REGEXP operator using(^) find from beginning i.e SELECT * FROM user WHERE username REGEXP “^NAME”;
4. What is the default port for MySQL Server?
The default port for MySQL Server is 3306. Another standard default is port 1433 in TCP/IP for SQL Server.
5. What are Heap tables?
HEAP tables are present in memory and they are used for high speed storage on temporary basis.
- BLOB or TEXT fields are not allowed
- Only comparison operators can be used =, <,>, = >,=<
- AUTO_INCREMENT is not supported by HEAP tables
- Indexes should be NOT NULL