• +91 9723535972
  • info@interviewmaterial.com

MS SQL Interview Questions and Answers

MS SQL Interview Questions and Answers

Question - 21 : - How do you add three minutes to a date?

Answer - 21 : - ADDDATE(techpreparation_publication_date, INTERVAL 3 MINUTE)

Question - 22 : - How do you convert between Unix timestamps and MySQL timestamps?

Answer - 22 : - UNIX_TIMESTAMP converts from MySQL timestamp to Unix timestamp, FROM_UNIXTIME converts from Unix timestamp to MySQL timestamp.

Question - 23 : - How are ENUMs and SETs represented internally?

Answer - 23 : - As unique integers representing the powers of two, due to storage optimizations.

Question - 24 : - Explain the difference between mysql and mysql interfaces in PHP?

Answer - 24 : - mysqli is the object-oriented version of mysql library functions.

Question - 25 : - What does tee command do in MySQL?

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

Question - 26 : - Can you save your connection settings to a conf file?

Answer - 26 : - 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.

Question - 27 : - What are some good ideas regarding user security in MySQL?

Answer - 27 : - There is no user without a password. There is no user without a user name. There is no user whose Host column contains % (which here indicates that the user can log in from anywhere in the network or the Internet). There are as few users as possible (in the ideal case only root) who have unrestricted access.

Question - 28 : - What does myisamchk do?

Answer - 28 : - It compressed the MyISAM tables, which reduces their disk usage.

Question - 29 : - Explain advantages of MyISAM over InnoDB?

Answer - 29 : - Much more conservative approach to disk space management - each MyISAM table is stored in a separate file, which could be compressed then with myisamchk if needed. With InnoDB the tables are stored in tablespace, and not much further optimization is possible. All data except for TEXT and BLOB can occupy 8,000 bytes at most. No full text indexing is available for InnoDB. TRhe COUNT(*)s execute slower than in MyISAM due to tablespace complexity.

Question - 30 : - How do you control the max size of a HEAP table?

Answer - 30 : - MySQL config variable max_heap_table_size.


NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners