October 26, 2018

Srikaanth

Hexacta MySQL Interview Questions Answers

Hexacta Most Frequently Asked Latest MySQL Interview Questions Answers

How Would You Delete A Column?

ALTER TABLE techpreparation_s DROP _user_id.

How Would You Change A Table To Innodb?

ALTER TABLE techpreparation_Questions ENGINE innodb;

When You Create A Table, And Then Run Show Create Table On It, You Occasionally Get Different Results Than What You Typed In. What Does Mysql Modify In Your Newly Created Tables?

1. VARCHARs with length less than 4 become CHARs
2. CHARs with length more than 3 become VARCHARs.
3. NOT NULL gets added to the columns declared as PRIMARY KEYs
4. Default values such as NULL are specified for each column

How Do I Find Out All Databases Starting With 'tech' To Which I Have Access To?

SHOW DATABASES LIKE ‘tech%’;

How Do You Concatenate Strings In Mysql?

CONCAT (string1, string2, string3)
Hexacta Most Frequently Asked Latest MySQL Interview Questions Answers
Hexacta Most Frequently Asked Latest MySQL Interview Questions Answers

How Do You Get A Portion Of A String?
SELECT SUBSTR(title, 1, 10) from techpreparation_Questions;

What's The Difference Between Char_length And Length?

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.

How Do You Convert A String To Utf-8?

SELECT (techpreparation_Question USING utf8);

What Do % And _ Mean Inside Like Statement?

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

What Does + Mean In Regexp?

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

How Do You Get The Month From A Timestamp?

SELECT MONTH(techpreparation_timestamp) from techpreparation_Questions;

How Do You Offload The Time/date Handling To Mysql?

SELECT DATE_FORMAT(techpreparation_timestamp, ‘%Y-%m-%d’) from techpreparation_Questions; A similar TIME_FORMAT function deals with time.

How Do You Add Three Minutes To A Date?

ADDDATE(techpreparation_publication_date, INTERVAL 3 MINUTE)

What's The Difference Between Unix Timestamps And Mysql Timestamps?

Internally Unix timestamps are stored as 32-bit integers, while MySQL timestamps are stored in a similar manner, but represented in readable YYYY-MM-DD HH:MM:SS format.

How Do You Convert Between Unix Timestamps And Mysql Timestamps?

UNIX_TIMESTAMP converts from MySQL timestamp to Unix timestamp, FROM_UNIXTIME converts from Unix timestamp to MySQL timestamp.

What Are Enums Used For In Mysql?

You can limit the possible values that go into the table. CREATE TABLE months (month ENUM ‘January’, ‘February’, ‘March’,…); INSERT months VALUES (’April’);

How Are Enums And Sets Represented Internally?

As unique integers representing the powers of two, due to storage optimizations.

How Do You Start And Stop Mysql On Windows?

net start MySQL, net stop MySQL

How Do You Start Mysql On Linux?

/etc/init.d/mysql start

Explain The Difference Between Mysql And Mysql Interfaces In Php?

mysql is the object-oriented version of mysql library functions.

What's The Default Port For Mysql Server?

3306 is the default port for MYSQL.

What Does Tee Command Do In Mysql?

tee followed by a filename turns on MySQL logging to a specified file. It can be stopped by command note.

Can You Save Your Connection Settings To A Conf File?

Yes, and name it ~/.my.conf. You might want to change the permissions on the file to 600, so that it’s not readable by others.

Subscribe to get more Posts :