Retrieve the name of the current database by using the DATEBASE() function: DATABASE() : Database « Command MySQL « SQL / MySQL






Retrieve the name of the current database by using the DATEBASE() function: DATABASE()

   
mysql>
mysql>
mysql> SELECT DATABASE();
+------------+
| DATABASE() |
+------------+
| test       |
+------------+
1 row in set (0.00 sec)

mysql>

   
    
    
  








Related examples in the same category