MySQL中的mysqlshow

mysqlshow语法:
mysqlshow [options][db_name [table_name [column_name]]]
使用mysqlshow,无参数
(相当于show databases)
D:\snx_workspace3.7\persistence-part>mysqlshow -hlocalhost -uroot -proot
+--------------------+
| Databases |
+--------------------+
| information_schema |
| job |
| mysql |
| test |
| world |
+--------------------+
使用mysqlshow,用一个参数
(相当于show tables from world)
D:\snx_workspace3.7\persistence-part>mysqlshow -hlocalhost -uroot -proot world
Database: world
+-----------------+
| Tables |
+-----------------+
| allergy |
| auth_info |
| booleans |
| booleans2 |
| city |
| country |
| countrylanguage |
| dup_names |
| t |
| t1 |
| t2 |
| t3 |
| t4 |
| t5 |
| t6 |
| ts_test1 |
| ts_test2 |
| ts_test3 |
| ts_test4 |
| ts_test5 |
| ts_test6 |
| ty |
| unique_names |
+-----------------+
使用mysqlshow,用二个参数
(相当于show full columns from world.t)
D:\snx_workspace3.7\persistence-part>mysqlshow -hlocalhost -uroot -proot world t
Database: world Table: t
+-------+------------------+-----------------+------+-----+------------+-------+---------------------------------+----
| Field | Type | Collation | Null | Key | Default | Extra | Privileges | Com
+-------+------------------+-----------------+------+-----+------------+-------+---------------------------------+----
| i | int(10) unsigned | | NO | | | | select,insert,update,references |
| c | char(10) | utf8_general_ci | YES | | | | select,insert,update,references |
| d | date | | YES | | 1999-12-31 | | select,insert,update,references |
+-------+------------------+-----------------+------+-----+------------+-------+---------------------------------+----

使用mysqlshow,用三个参数
(相当于show full columns from world.t like 'c')
D:\snx_workspace3.7\persistence-part>mysqlshow -hlocalhost -uroot -proot world t c
Database: world Table: t Wildcard: c
+-------+----------+-----------------+------+-----+---------+-------+---------------------------------+---------+
| Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment |
+-------+----------+-----------------+------+-----+---------+-------+---------------------------------+---------+
| c | char(10) | utf8_general_ci | YES | | | | select,insert,update,references | |
+-------+----------+-----------------+------+-----+---------+-------+---------------------------------+---------+
支持模糊查询
D:\snx_workspace3.7\persistence-part>mysqlshow -hlocalhost -uroot -proot world t*
Database: world Wildcard: t%
+----------+
| Tables |
+----------+
| t |
| t1 |
| t2 |
| t3 |
| t4 |
| t5 |
| t6 |
| ts_test1 |
| ts_test2 |
| ts_test3 |
| ts_test4 |
| ts_test5 |
| ts_test6 |
| ty |
+----------+

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值