How can we find the version of the MySQL server and the name of the current database by SELECT query?

We can use built in functions VERSION() and DATABASE() in MySQL to get the version of MySQL server and the name of database in MySQL.

Query is as follows:

SELECT VERSION(), DATABASE();

Read the full book at www.amazon.com
Posted in MySQL, MySQL Interview Questions

Leave a Reply

Your email address will not be published. Required fields are marked *

*