Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

MySQL Interview Questions And Answers

MySql Interview Questions And Answers

This page contains the list commonly asked MySQL interview questions and answers. MySQL is an open-source relational database management system (RDBMS) owned by Oracle, though initially owned and sponsored by a single for-profit firm, the Swedish company MYSQLAB. The complete source code of MySQL is accessible under the GNU General Public License terms.

MySQL Interview Questions And Answers

Q1: In which language MySQL is developed?
MySQL is developed in C & C++ and its SQL parser is written in yacc programming language.


Q2: What is Technical Specification of MySQL?
Below are the technical specification of MySQL database:
  • High performance
  • Flexible structure
  • Replication and high availability
  • Security and storage management
  • Easy to manage and use

Q3: How to display the current date and time using MySQL Query?
Use the below MySQL query to display the current date and time:
SELECT NOW();

Below query will display only date:
SELECT CURRENT_DATE(); 

Q4: What is limitation to add columns to create for an index?
You can create maximum of 16 indexed columns for a standard MySQL table.
Q5: How do you create an alias in MySQL?
Use the below MySQL query to create an alias in MySQL database:
SELECT
	t.order_id, orders.customer_id, t.total, orders.order_placed_date
FROM
	# List of all orders and total order values (alias t)
	(
		SELECT 
			order_id, SUM(purchase_price * quantity) AS total
		FROM 
			products_to_orders 
		GROUP BY order_id
	) AS t
INNER JOIN
	orders ON t.order_id = orders.order_id;

Q6: What is default port for MySQL Server?
The default port of MySQL server is 3306.
Q7: How can you dispaly the all indexes defined for a database table?
Use the below MySQL query to display the all nindexes defined for a database table:
SHOW INDEX FROM ;

Q8: What is InnoDB?
The InnoDB is a database storage engine used for the safe database transactions. It was developed by Inno Oy, now Oracle Corporation.
Q9: How many types of JOINS in MySQL?
Below are the list of joins which you can used in MySQL:
1) Inner join
1.1) equi join
1.2) natural join

2)Outer join

2.1)left join
2.2)right join
2.3) full join

3) Cross join


Q10: How to get only the distinict columns values in MySQL?
Use the MySQL query to get only the distinict columns values from table:
SELECT  DISTINCT column_name  FROM table_name ;

Q11: How many TRIGGERS are possible in MySQL?
There are six type of triggers to use in MySQL database table.
  1. Before Insert
  2. After Insert
  3. Before Update
  4. After Update
  5. Before Delete
  6. After Delete

Q12: How to concatenate two fields in MySQL?
Use the below MySQL query to concatenate two fields in MySQL:
SELECT CONCAT(column1,column2) FROM table_name

Q13: List out the storage engines which MySQL support?
Below is the list of storage engines which MySQL support:
  1. MyISAM
  2. InnoDB
  3. Memory
  4. CSV
  5. Merge

Q14: How do you get a portion of a string?
Use the below Mysql Query to get a portion of a string:

SELECT SUBSTR(name, 1, 10) from questions;

Q15: How do you convert a string to UTF-8?
Use the below MySQL query to convert a string to UTF-8 using MySQl query:
SELECT (question USING utf8);

The post MySQL Interview Questions And Answers appeared first on FreeWebMentor.



This post first appeared on Programming Blog Focused On Web Technologies, please read the originial post: here

Share the post

MySQL Interview Questions And Answers

×

Subscribe to Programming Blog Focused On Web Technologies

Get updates delivered right to your inbox!

Thank you for your subscription

×