Question:- What Is The Difference Between MyISAM Static And MyISAM Dynamic?
Answer:- In MyISAM Static all the fields will have fixed width. The Dynamic MyISAM table will have fields like TEXT, BLOB, etc. to accommodate the data types with various lengths. MyISAM Static would be easier to restore in case of corruption.
Question:- What Are Federated Tables?
Answer:- Federated tables are the ones which allow access to the tables located on other databases on other servers.
Question:- What If A Table Has One Column Defined As TIMESTAMP?
Answer:- Timestamp field gets the current TIMESTAMP whenever the row gets altered.
Question:- What Happens When The Column Is Set To AUTO INCREMENT And If You Reach Maximum Value In The Table?
Answer:- It stops incrementing. Any further inserts are going to produce an error, since the key has been used already.
Question:- How Can We Find Out Which Auto Increment Was Assigned On Last Insert?
Answer:- LAST_INSERT_ID will return the last value assigned by Auto_increment and it is not required to specify the table name.
Question:- How Can You See All Indexes Defined For A Table?
Answer:- Indexes are defined for the table by: SHOW INDEX FROM ;
Question:- What Do You Mean By % And _in The LIKE Statement?
Answer:- % corresponds to 0 or more characters, _ is exactly one character in the LIKE statement.
Question:- How Can We Convert Between Unix & MySQL Timestamps?
Answer:- • UNIX_TIMESTAMP is the command which converts from MySQL timestamp to Unix timestamp • FROM_UNIXTIME is the command which converts from Unix timestamp to MySQL timestamp.
Question:- What Are The Column Comparisons Operators?
Answer:- The = , < > , <=, <, >=, >, <<,>>, <=> , AND, OR, or LIKE operators are used in column comparisons in SELECT statements.
Question:- How Can We Get The Number Of Rows Affected By Query?
Answer:- Number of rows can be obtained by SELECT COUNT (user_id) FROM users;
Question:- Is MySQL Query Case Sensitive?
Answer:- No, its not. • SELECT VERSION(), CURRENT_DATE; • seleCt vErsion(), current_DATE; • SeLect version(), current_date; All these examples are the same. It is not case sensitive.
Question:- What Is The Difference Between The LIKE And REGEXP Operators?
Answer:- LIKE and REGEXP operators are used to express ^ and %. • SELECT * FROM employee WHERE emp_name REGEXP “^b”; • SELECT * FROM employee WHERE emp_name LIKE “%b”.
Question:- What Is The Difference Between Mysql_fetch_array And Mysql_fetch_object?
Answer:- Following are the differences between mysql_fetch_array and mysql_fetch_object: • mysql_fetc_array() – Returns a result row as an associated array or a regular array from the database. • Mysql_fetch_object – Returns as a result row as object from database.
Question:- How Can We Run Batch Mode In MySQL?
Answer:- Following commands are used to run in batch mode: Mysql; Mysql mysql.out
