MySQL-笔记

1.

统计MySQL中某个数据库中有多少张表

SELECT count(*) TABLES, table_schema FROM information_schema.TABLES
where table_schema = '数据库名称' GROUP BY table_schema;

统计MySQL中某个数据库中表记录数
use information_schema;
select table_name,table_rows from tables where TABLE_SCHEMA = 'pims_ptemp' order by table_rows desc;

统计某表的字段数

SELECT COUNT(*) FROM information_schema.columns WHERE table_schema='test_cases' AND table_name='cases_send' ;

2. workbench快捷键

Ctrl+Enter 执行当前行

在设置文件\MySQL\MySQL Workbench 8.0 CE\data\main_menu.xml中

搜索‘reconnect'

找到

<value type="object" struct-name="app.MenuItem" id="com.mysql.wb.menu.query.reconnect">

在其后增加一行:

<value type="string" key="shortcut">Modifier+K</value>

后重启,可用Ctrl+K刷新

3.workbench报错 Error Code 2013

错误原因是查询执行超时

修改设置Editi>prefference>sql editor 将keep-alive timeout interval 改成自己喜欢的数字

4.

posted @ 2020-09-30 04:00  行远顺发  阅读(92)  评论(0)    收藏  举报