Set - 1

Question 21 :

How do you get a portion of a string?

Answer :

SELECT SUBSTR(title, 1, 10) from techpreparation_questions;

Question 22 :

What's the difference between CHAR_LENGTH and LENGTH?

Answer :

The first is, naturally, the character count. The second is byte count. For the Latin characters the numbers are the same, but they're not the same for Unicode and other encodings.

Question 23 :

How do you convert a string to UTF-8?

Answer :

SELECT (techpreparation_question USING utf8);

Question 24 :

What do % and _ mean inside LIKE statement?

Answer :

% corresponds to 0 or more characters, _ is exactly one character.

Question 25 :

What does + mean in REGEXP?

Answer :

At least one character. Appendix G. Regular Expressions from MySQL manual is worth perusing before the interview.