MySQL -- 数据库操作(创建、删除、修改、查看、选择)
1、查看数据库:
SHOW DATABASES [LIKE ‘数据库名‘];
语法说明如下:
- LIKE 从句是可选项,用于匹配指定的数据库名称。LIKE 从句可以部分匹配,也可以完全匹配。
- 数据库名由单引号
‘ ‘
包围。
示例1:
mysql> SHOW DATABASES; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | sakila | | sys | | world | +--------------------+ 6 row in set (0.22 sec)
示例2:使用like语句(模糊查询)
mysql> SHOW DATABASES LIKE ‘%test%‘; +--------------------+ | Database (%test%) | +--------------------+ | db_test | +--------------------+ | db_test_db | +--------------------+ | test_db | +--------------------+ 3 row in set (0.03 sec)
相关推荐
lbyd0 2020-11-17
sushuanglei 2020-11-12
腾讯soso团队 2020-11-06
gaobudong 2020-11-04
yangkang 2020-11-09
85477104 2020-11-17
KANSYOUKYOU 2020-11-16
wushengyong 2020-10-28
lizhengjava 2020-11-13
星月情缘 2020-11-13
huangxiaoyun00 2020-11-13
luyong0 2020-11-08
Apsaravod 2020-11-05
PeterChangyb 2020-11-05
wwwjun 2020-11-02
gyunwh 2020-11-02
EchoYY 2020-10-31
dingyahui 2020-10-30