Question:- Differentiate CHAR_LENGTH And LENGTH?
Answer:- CHAR_LENGTH is a character count whereas the Length is byte count. The numbers are the same for latin characters but they are different for unicode and other encodings.
Question:- How To Represent ENUMs And SET Internally?
Answer:- ENUMs and SET are used to represent powers of two because of storage optimizations.
Question:- Define REGEXP?
Answer:- REGEXP is a pattern match that matches patterns anywhere in the search value.
Question:- Mention String Types Available For Columns.
Answer:- The string types are: • SET • BLOB • ENUM • CHAR • TEXT • VARCHAR
Question:- What Storage Engines Are Used In MySQL?
Answer:- Storage engines are called the table types and data is stored in files using various techniques. Technique involves: • Storage mechanism • Locking levels • Indexing • Capabilities and functions
Question:- What Are The Drivers In MySQL?
Answer:- Following are the drivers available in MySQL: • PHP Driver • JDBC Driver • ODBC Driver • C WRAPPER • PYTHON Driver • PERL Driver • RUBY Driver • CAP11PHP Driver • Ado.net5.mxj
Question:- What Does A TIMESTAMP Do On UPDATE CURRENT_TIMESTAMP Data Type?
Answer:- The TIMESTAMP column is updated with Zero when the table is created. The CURRENT_TIMESTAMP modifier updates the timestamp field to the current time whenever there is a change in other fields of the table.
Question:- What Is The Difference Between Primary Key And Candidate Key?
Answer:- Every row of the table is identified uniquely by the primary key. There is only one primary key for a table. The primary key is also a candidate key. By common convention, candidate key can be designated as primary and can be used for any foreign key references.
Question:- What Does Myisamchk Do?
Answer:- It compresses the MyISAM tables, which reduces their disk or memory usage.
Question:- How Do You Control The Maximum Size Of A HEAP Table?
Answer:- Maximum size of the HEAP table can be controlled by the MySQL config variable called max_heap_table_size.
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.
