SQL/MySQL/Database/Current Database

Материал из SQL эксперт
Перейти к: навигация, поиск

List databases

/*
mysql> create database info;
mysql> Show databases;
+----------+
| Database |
+----------+
| info     |
| sqle   |
| mysql    |
| t        |
| test     |
| ttt      |
+----------+
6 rows in set (0.00 sec)
mysql> use info;
Database changed
*/  
  
create database info;
Show databases;
use info;



Show databases in mysql

  
/* SHOW DATABASES; */
SHOW DATABASES;
/*
mysql> SHOW DATABASES;
+----------+
| Database |
+----------+
| info     |
| sqle   |
| mysql    |
| t        |
| test     |
| ttt      |
+----------+
6 rows in set (0.00 sec)

*/