Monday, 10 February 2014

MySQL select or use a database query

From the mysql command line execute the following query:

mysql> use databasename;

for example to use a database "test" type the query;

mysql> use test;

in order to check if your selected database is in use, execute the query:

mysql> select database();

we have to use the database() function.

No comments:

Post a Comment